Added one test to BookSectionDefaultCacheStrategyTest
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 2 Jul 2010 10:50:20 +0000 (10:50 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 2 Jul 2010 10:50:20 +0000 (10:50 +0000)
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/cache/reference/BookSectionDefaultCacheStrategyTest.java

index d8cc1155857e0af0c12fa97dff3f98c069592fe9..e1d87e74b1e77bf82f983e46759df136df98ffab 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.BeforeClass;
 import org.junit.Ignore;\r
 import org.junit.Test;\r
 \r
+import eu.etaxonomy.cdm.model.agent.Person;\r
 import eu.etaxonomy.cdm.model.agent.Team;\r
 import eu.etaxonomy.cdm.model.common.TimePeriod;\r
-import eu.etaxonomy.cdm.model.reference.IArticle;\r
 import eu.etaxonomy.cdm.model.reference.IBook;\r
 import eu.etaxonomy.cdm.model.reference.IBookSection;\r
-import eu.etaxonomy.cdm.model.reference.IJournal;\r
-import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;\r
 \r
 /**\r
@@ -123,4 +121,23 @@ public class BookSectionDefaultCacheStrategyTest {
                Assert.assertEquals("in Book Author, My book: 55. 1975", bookSection1.getNomenclaturalCitation(detail1));\r
        }\r
        \r
+       @Test\r
+       public void testRealCichorieaeExample(){\r
+               IBookSection bookSection = ReferenceFactory.newBookSection();\r
+               bookSection.setTitle("129. Crepis L.");\r
+               Person person = Person.NewTitledInstance("Lamond J. M.");\r
+               bookSection.setAuthorTeam(person);\r
+               bookSection.setPages("814-841");\r
+               \r
+               IBook book = ReferenceFactory.newBook();\r
+               book.setTitle("Flora of Turkey and the East Aegean Islands");\r
+               book.setPlacePublished("Edinburgh");\r
+               book.setDatePublished(TimePeriod.NewInstance(1975));\r
+               book.setPublisher("University of Edinburgh");\r
+               book.setVolume("5");\r
+               book.setAuthorTeam(Team.NewTitledInstance("Davis, P. H.", null));\r
+               bookSection.setInBook(book);\r
+               Assert.assertEquals("Lamond J. M. - 129. Crepis L. in Davis, P. H., Flora of Turkey and the East Aegean Islands 5. 1975", bookSection.getTitleCache());\r
+       }\r
+       \r
 }\r