}
/**
- * 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() {
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());
//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));