re-integrating branch cdmlib/3.x-unitils-upgrade
[cdmlib.git] / cdmlib-services / src / test / java / eu / etaxonomy / cdm / api / service / TaxonServiceImplTest.java
index 895d8d4caeea40d5c45a2412bcb01b55581fad03..ec3d0d4a2bb0408e3acba0f2b286d83e5ff09057 100644 (file)
@@ -685,8 +685,11 @@ public class TaxonServiceImplTest extends CdmTransactionalIntegrationTest {
         Assert.assertEquals("There should be 4 names left in the database (name is related to synonymName2)", 4, nNames);\r
         int nRelations = service.countAllRelationships();\r
         //may change with better implementation of countAllRelationships (see #2653)\r
-        Assert.assertEquals("There should be 1 relationship left in the database (the name relationship)", 1, nRelations);\r
-\r
+        Assert.assertEquals("There should be 0 taxon relationships left in the database", 0, nRelations);\r
+        nRelations = nameService.getAllRelationships(1000, 0).size();\r
+        Assert.assertEquals("There should be 1 name relationship left in the database", 1, nRelations);\r
+        \r
+        \r
         //clean up database\r
         name2 = (TaxonNameBase)nameService.load(uuidSynonymName2);\r
         NameRelationship rel = CdmBase.deproxy(name2.getNameRelations().iterator().next(), NameRelationship.class);\r
@@ -774,8 +777,9 @@ public class TaxonServiceImplTest extends CdmTransactionalIntegrationTest {
         nNames = nameService.count(TaxonNameBase.class);\r
         Assert.assertEquals("There should be 4 names left in the database", 4, nNames);\r
         nRelations = service.countAllRelationships();\r
-        //may change with better implementation of countAllRelationships (see #2653)\r
-        Assert.assertEquals("There should be 1 name relationship and no synonym relationship in the database", 1, nRelations);\r
+        Assert.assertEquals("There should be no taxon or synonym relationship in the database", 0, nRelations);\r
+        nRelations = nameService.getAllRelationships(1000,0).size();\r
+        Assert.assertEquals("There should be 1 name relationship in the database", 1, nRelations);\r
 \r
     }\r
 \r