Add test suite (relates to RM-1770)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@92112 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2014-12-09 23:36:03 +00:00
parent 91e2e76b61
commit 9c07772037
3 changed files with 46 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ import org.alfresco.module.org_alfresco_module_rm.test.integration.issue.IssueTe
import org.alfresco.module.org_alfresco_module_rm.test.integration.job.JobTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.record.RecordTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.recordfolder.RecordFolderTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.relationship.RelationshipTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.report.ReportTestSuite;
import org.alfresco.module.org_alfresco_module_rm.test.integration.version.VersionTestSuite;
import org.junit.runner.RunWith;
@@ -51,7 +52,8 @@ import org.junit.runners.Suite.SuiteClasses;
RecordFolderTestSuite.class,
JobTestSuite.class,
HoldTestSuite.class,
VersionTestSuite.class
VersionTestSuite.class,
RelationshipTestSuite.class
})
public class IntegrationTestSuite
{

View File

@@ -33,16 +33,15 @@ import org.alfresco.util.GUID;
*/
public class DeleteRelationshipTest extends BaseRMTestCase
{
public void testDeleteRelationship() throws Exception
public void testDeleteRelationship() throws Exception
{
doBehaviourDrivenTest(new BehaviourDrivenTest()
doBehaviourDrivenTest(new BehaviourDrivenTest()
{
/** test data */
NodeRef sourceNode;
NodeRef targetNode;
String associationName = "obsoletes";
public void given()
{
@@ -66,7 +65,8 @@ public class DeleteRelationshipTest extends BaseRMTestCase
{
//check if relationship is deleted
Set<Relationship> relationships = relationshipService.getRelationshipsFrom(sourceNode);
for(Relationship r : relationships){
for(Relationship r : relationships)
{
assertFalse(r.getTarget().equals(targetNode) && r.getUniqueName().equals(associationName));
}
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.test.integration.relationship;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* Relationship integration test suite
*
* @author Roy Wetherall
* @since 2.3
*/
@RunWith(Suite.class)
@SuiteClasses(
{
DeleteRelationshipTest.class
})
public class RelationshipTestSuite
{
}