cleanup
[cdmlib.git] / cdmlib-services / src / test / java / eu / etaxonomy / cdm / api / service / name / TypeDesignationSetFormatterTest.java
index 1a7bf687872eb8b54620a578d1160f66263218af..0cd7c46f47b71691664050c1874dd38e63cae16b 100644 (file)
@@ -170,6 +170,7 @@ public class TypeDesignationSetFormatterTest extends TermTestBase{
 
     @Test
     public void testNameTypeDesignationTaggedText() throws RegistrationValidationException {
+
         @SuppressWarnings("rawtypes")
         List<TypeDesignationBase> tds = new ArrayList<>();
         tds.add(ntd);
@@ -188,15 +189,17 @@ public class TypeDesignationSetFormatterTest extends TermTestBase{
         Assert.assertEquals("first entry should be the typified name",
                 new TaggedText(TagEnum.name, "Prionus L.",TypedEntityReference.fromEntity(typifiedName, false)), taggedText.get(0));
         Assert.assertEquals("fourth entry should be the name type nameCache",
-                new TaggedText(TagEnum.name, "Prionus coriatius",TypedEntityReference.fromEntity(ntd.getTypeName(), false)), taggedText.get(3));
+                new TaggedText(TagEnum.name, "Prionus"), taggedText.get(3));  //maybe in future the entityReference should be TypedEntityReference.fromEntity(ntd.getTypeName(), false)
+        Assert.assertEquals("fourth entry should be the name type nameCache",
+                new TaggedText(TagEnum.name, "coriatius"), taggedText.get(4)); //maybe in future the entityReference should be TypedEntityReference.fromEntity(ntd.getTypeName(), false)
         Assert.assertEquals("fifth entry should be the name type authorship cache",
-                new TaggedText(TagEnum.authors, "L."), taggedText.get(4));
+                new TaggedText(TagEnum.authors, "L."), taggedText.get(5));
 
         //protected titleCache
         ntd.getTypeName().setTitleCache("Prionus coriatius L.", true);
         taggedText = formatter.toTaggedText(manager);
         Assert.assertEquals("fourth entry should be the name type titleCache",
-                new TaggedText(TagEnum.name, "Prionus coriatius L.",TypedEntityReference.fromEntity(ntd.getTypeName(), false)), taggedText.get(3));
+                new TaggedText(TagEnum.name, "Prionus coriatius L."), taggedText.get(3)); //maybe in future the entityReference should be TypedEntityReference.fromEntity(ntd.getTypeName(), false)
         Assert.assertEquals("there should be 4 tags only", 4, taggedText.size());
     }
 }
\ No newline at end of file