+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.cdm.strategy.cache.reference;\r
+\r
+\r
+import org.junit.Assert;\r
+import org.junit.Before;\r
+import org.junit.BeforeClass;\r
+import org.junit.Test;\r
+\r
+import eu.etaxonomy.cdm.model.reference.ReferenceType;\r
+\r
+/**\r
+ * @author a.mueller\r
+ *\r
+ */\r
+public class ReferenceTypeTest {\r
+\r
+ /**\r
+ * @throws java.lang.Exception\r
+ */\r
+ @BeforeClass\r
+ public static void setUpBeforeClass() throws Exception {\r
+ }\r
+\r
+ /**\r
+ * @throws java.lang.Exception\r
+ */\r
+ @Before\r
+ public void setUp() throws Exception {\r
+ }\r
+\r
+// ****************************** TESTS ***************************************\r
+ \r
+ @Test\r
+ public void testIsPrintedUnit(){\r
+ Assert.assertTrue("Proceedings must be printed unit", ReferenceType.Proceedings.isPrintedUnit());\r
+ Assert.assertTrue("Book must be printed unit", ReferenceType.Book.isPrintedUnit());\r
+ Assert.assertFalse("Article must not be printed unit", ReferenceType.Article.isPrintedUnit());\r
+ Assert.assertFalse("BookSection must not be printed unit", ReferenceType.BookSection.isPrintedUnit());\r
+ Assert.assertFalse("CdDvd must not be printed unit", ReferenceType.CdDvd.isPrintedUnit());\r
+ Assert.assertFalse("Generic must not be printed unit", ReferenceType.Generic.isPrintedUnit());\r
+ Assert.assertFalse("Database must not be printed unit", ReferenceType.Database.isPrintedUnit());\r
+ Assert.assertFalse("InProceedings must not be printed unit", ReferenceType.InProceedings.isPrintedUnit());\r
+ Assert.assertFalse("Journal must not be printed unit", ReferenceType.Journal.isPrintedUnit());\r
+ Assert.assertFalse("Map must not be printed unit", ReferenceType.Map.isPrintedUnit());\r
+ Assert.assertFalse("Patent must not be printed unit", ReferenceType.Patent.isPrintedUnit());\r
+ Assert.assertFalse("PersonalCommunication must not be printed unit", ReferenceType.PersonalCommunication.isPrintedUnit());\r
+ Assert.assertFalse("PrintSeries must not be printed unit", ReferenceType.PrintSeries.isPrintedUnit());\r
+ Assert.assertFalse("Report must not be printed unit", ReferenceType.Report.isPrintedUnit());\r
+ Assert.assertFalse("Thesis must not be printed unit", ReferenceType.Thesis.isPrintedUnit());\r
+ Assert.assertFalse("WebPage must not be printed unit", ReferenceType.WebPage.isPrintedUnit());\r
+ }\r
+ \r
+ @Test\r
+ public void testIsPublication(){\r
+ Assert.assertTrue("Proceedings must be publication", ReferenceType.Proceedings.isPublication());\r
+ Assert.assertTrue("Book must be publication", ReferenceType.Book.isPublication());\r
+ Assert.assertFalse("Article must not be publication", ReferenceType.Article.isPublication());\r
+ Assert.assertFalse("BookSection must not be publication", ReferenceType.BookSection.isPublication());\r
+ Assert.assertTrue("CdDvd must be publication", ReferenceType.CdDvd.isPublication());\r
+ Assert.assertTrue("Generic must be publication", ReferenceType.Generic.isPublication());\r
+ Assert.assertTrue("Database must be publication", ReferenceType.Database.isPublication());\r
+ Assert.assertFalse("InProceedings must not be publication", ReferenceType.InProceedings.isPublication());\r
+ Assert.assertTrue("Journal must be publication", ReferenceType.Journal.isPublication());\r
+ Assert.assertTrue("Map must be publication", ReferenceType.Map.isPublication());\r
+ Assert.assertFalse("Patent must not be publication", ReferenceType.Patent.isPublication());\r
+ Assert.assertFalse("PersonalCommunication must not be publication", ReferenceType.PersonalCommunication.isPublication());\r
+ Assert.assertTrue("PrintSeries must be publication", ReferenceType.PrintSeries.isPublication());\r
+ Assert.assertTrue("Report must be publication", ReferenceType.Report.isPublication());\r
+ Assert.assertTrue("Thesis must be publication", ReferenceType.Thesis.isPublication());\r
+ Assert.assertTrue("WebPage must be publication", ReferenceType.WebPage.isPublication());\r
+ }\r
+ \r
+\r
+ @Test\r
+ public void testIsVolumeReference(){\r
+ Assert.assertTrue("Proceedings must be volume reference", ReferenceType.Proceedings.isVolumeReference());\r
+ Assert.assertTrue("Book must be volume reference", ReferenceType.Book.isVolumeReference());\r
+ Assert.assertTrue("Article must be volume reference", ReferenceType.Article.isVolumeReference());\r
+ Assert.assertFalse("BookSection must not be volume reference", ReferenceType.BookSection.isVolumeReference());\r
+ Assert.assertFalse("CdDvd must not be volume reference", ReferenceType.CdDvd.isVolumeReference());\r
+ Assert.assertTrue("Generic must be volume reference", ReferenceType.Generic.isVolumeReference());\r
+ Assert.assertFalse("Database must not be volume reference", ReferenceType.Database.isVolumeReference());\r
+ Assert.assertFalse("InProceedings must not be volume reference", ReferenceType.InProceedings.isVolumeReference());\r
+ Assert.assertFalse("Journal must not be volume reference", ReferenceType.Journal.isVolumeReference());\r
+ Assert.assertFalse("Map must not be volume reference", ReferenceType.Map.isVolumeReference());\r
+ Assert.assertFalse("Patent must not be volume reference", ReferenceType.Patent.isVolumeReference());\r
+ Assert.assertFalse("PersonalCommunication must not be volume reference", ReferenceType.PersonalCommunication.isVolumeReference());\r
+ Assert.assertFalse("PrintSeries must not be volume reference", ReferenceType.PrintSeries.isVolumeReference());\r
+ Assert.assertFalse("Report must not be volume reference", ReferenceType.Report.isVolumeReference());\r
+ Assert.assertFalse("Thesis must not be volume reference", ReferenceType.Thesis.isVolumeReference());\r
+ Assert.assertFalse("WebPage must not be volume reference", ReferenceType.WebPage.isVolumeReference());\r
+ }\r
+ \r
+\r
+ @Test\r
+ public void testIsSection(){\r
+ Assert.assertTrue("Proceedings must be section", ReferenceType.Proceedings.isSection());\r
+ Assert.assertTrue("Book must be section", ReferenceType.Book.isSection());\r
+ Assert.assertTrue("Article must be section", ReferenceType.Article.isSection());\r
+ Assert.assertTrue("BookSection must be section", ReferenceType.BookSection.isSection());\r
+ Assert.assertFalse("CdDvd must not be section", ReferenceType.CdDvd.isSection());\r
+ Assert.assertFalse("Generic must not be section", ReferenceType.Generic.isSection());\r
+ Assert.assertFalse("Database must not be section", ReferenceType.Database.isSection());\r
+ Assert.assertTrue("InProceedings must be section", ReferenceType.InProceedings.isSection());\r
+ Assert.assertFalse("Journal must not be section", ReferenceType.Journal.isSection());\r
+ Assert.assertFalse("Map must not be section", ReferenceType.Map.isSection());\r
+ Assert.assertFalse("Patent must not be section", ReferenceType.Patent.isSection());\r
+ Assert.assertFalse("PersonalCommunication must not be section", ReferenceType.PersonalCommunication.isSection());\r
+ Assert.assertFalse("PrintSeries must not be section", ReferenceType.PrintSeries.isSection());\r
+ Assert.assertFalse("Report must not be section", ReferenceType.Report.isSection());\r
+ Assert.assertFalse("Thesis must not be section", ReferenceType.Thesis.isSection());\r
+ Assert.assertFalse("WebPage must not be section", ReferenceType.WebPage.isSection());\r
+ }\r
+}\r