ref #6369 adapt existing occurrences of interface to removed generics
[cdmlib.git] / cdmlib-model / src / test / java / eu / etaxonomy / cdm / model / name / NonViralNameTest.java
index 591c0eed5bc98192c679f49e2c5c42ca8fc0389d..9a8890b6f41cd94ea0fd7a3dc3bca40d3a6b4886 100644 (file)
@@ -196,7 +196,7 @@ public class NonViralNameTest extends EntityTestBase {
        }
 
        /**
-        * Test method for {@link eu.etaxonomy.cdm.model.name.NonViralName#getInfraGenericEpithet()}.
+        * Test method for {@link eu.etaxonomy.cdm.model.name.NonViralName#getInfragenericEpithet()}.
         */
        @Test
        public final void testGetSetInfraGenericEpithet() {
@@ -374,7 +374,7 @@ public class NonViralNameTest extends EntityTestBase {
                nonViralName1.addHybridChild(child, HybridRelationshipType.FEMALE_PARENT(), "child rule");
 
 
-               NonViralName<?> clone = (NonViralName)nonViralName1.clone();
+               INonViralName clone = (INonViralName)nonViralName1.clone();
                Assert.assertEquals("Genus should be equal", "Aus", clone.getGenusOrUninomial());
                Assert.assertEquals("Infragenus should be equal", "Infaus", clone.getInfraGenericEpithet());
                Assert.assertEquals("Specific epithet should be equal", "bus", clone.getSpecificEpithet());
@@ -389,13 +389,13 @@ public class NonViralNameTest extends EntityTestBase {
 
                //hybrid parents of clone
                Assert.assertEquals("There should be exactly 2 hybrid relationships in which the clone takes the child role", 2, clone.getHybridChildRelations().size());
-               Set<NonViralName> parentSet = new HashSet<NonViralName>();
-               Set<NonViralName> childSet = new HashSet<NonViralName>();
+               Set<TaxonNameBase> parentSet = new HashSet<>();
+               Set<TaxonNameBase> childSet = new HashSet<>();
                for (Object object : clone.getHybridChildRelations()){
                        HybridRelationship childRelation = (HybridRelationship)object;
-                       NonViralName<?> relatedFrom = childRelation.getRelatedFrom();
+                       TaxonNameBase<?,?> relatedFrom = childRelation.getRelatedFrom();
                        parentSet.add(relatedFrom);
-                       NonViralName<?> relatedTo = childRelation.getRelatedTo();
+                       TaxonNameBase<?,?> relatedTo = childRelation.getRelatedTo();
                        childSet.add(relatedTo);
                }
                Assert.assertTrue("Parent set should contain parent1", parentSet.contains(parent));