use of eu.etaxonomy.cdm.strategy.cache.TaggedText in project cdmlib by cybertaxonomy.
the class TaxonNameDefaultCacheStrategyTest method testGetTaggedNameSpeciesAggregate.
@Test
public void testGetTaggedNameSpeciesAggregate() {
TaxonName speciesAggregate = TaxonNameFactory.NewBotanicalInstance(Rank.SPECIESAGGREGATE());
speciesAggregate.setGenusOrUninomial("Mygenus");
speciesAggregate.setSpecificEpithet("myspecies");
List<TaggedText> taggedName = strategy.getTaggedName(speciesAggregate);
Assert.assertEquals("1rd tag must be genus epithet", "Mygenus", taggedName.get(0).getText());
Assert.assertEquals("2rd tag must be species epithet", "myspecies", taggedName.get(1).getText());
Assert.assertEquals("3rd tag must be aggregate marker", "aggr.", taggedName.get(2).getText());
}
Aggregations