1
|
/**
|
2
|
*
|
3
|
*/
|
4
|
package eu.etaxonomy.cdm.strategy.cache.reference;
|
5
|
|
6
|
|
7
|
import org.junit.Assert;
|
8
|
import org.junit.Before;
|
9
|
import org.junit.BeforeClass;
|
10
|
import org.junit.Test;
|
11
|
|
12
|
import eu.etaxonomy.cdm.model.reference.ReferenceType;
|
13
|
|
14
|
/**
|
15
|
* @author a.mueller
|
16
|
*
|
17
|
*/
|
18
|
public class ReferenceTypeTest {
|
19
|
|
20
|
/**
|
21
|
* @throws java.lang.Exception
|
22
|
*/
|
23
|
@BeforeClass
|
24
|
public static void setUpBeforeClass() throws Exception {
|
25
|
}
|
26
|
|
27
|
/**
|
28
|
* @throws java.lang.Exception
|
29
|
*/
|
30
|
@Before
|
31
|
public void setUp() throws Exception {
|
32
|
}
|
33
|
|
34
|
// ****************************** TESTS ***************************************
|
35
|
|
36
|
@Test
|
37
|
public void testIsPrintedUnit(){
|
38
|
Assert.assertTrue("Proceedings must be printed unit", ReferenceType.Proceedings.isPrintedUnit());
|
39
|
Assert.assertTrue("Book must be printed unit", ReferenceType.Book.isPrintedUnit());
|
40
|
Assert.assertFalse("Article must not be printed unit", ReferenceType.Article.isPrintedUnit());
|
41
|
Assert.assertFalse("BookSection must not be printed unit", ReferenceType.BookSection.isPrintedUnit());
|
42
|
Assert.assertFalse("CdDvd must not be printed unit", ReferenceType.CdDvd.isPrintedUnit());
|
43
|
Assert.assertFalse("Generic must not be printed unit", ReferenceType.Generic.isPrintedUnit());
|
44
|
Assert.assertFalse("Database must not be printed unit", ReferenceType.Database.isPrintedUnit());
|
45
|
Assert.assertFalse("InProceedings must not be printed unit", ReferenceType.InProceedings.isPrintedUnit());
|
46
|
Assert.assertFalse("Journal must not be printed unit", ReferenceType.Journal.isPrintedUnit());
|
47
|
Assert.assertFalse("Map must not be printed unit", ReferenceType.Map.isPrintedUnit());
|
48
|
Assert.assertFalse("Patent must not be printed unit", ReferenceType.Patent.isPrintedUnit());
|
49
|
Assert.assertFalse("PersonalCommunication must not be printed unit", ReferenceType.PersonalCommunication.isPrintedUnit());
|
50
|
Assert.assertFalse("PrintSeries must not be printed unit", ReferenceType.PrintSeries.isPrintedUnit());
|
51
|
Assert.assertFalse("Report must not be printed unit", ReferenceType.Report.isPrintedUnit());
|
52
|
Assert.assertFalse("Thesis must not be printed unit", ReferenceType.Thesis.isPrintedUnit());
|
53
|
Assert.assertFalse("WebPage must not be printed unit", ReferenceType.WebPage.isPrintedUnit());
|
54
|
}
|
55
|
|
56
|
@Test
|
57
|
public void testIsPublication(){
|
58
|
Assert.assertTrue("Proceedings must be publication", ReferenceType.Proceedings.isPublication());
|
59
|
Assert.assertTrue("Book must be publication", ReferenceType.Book.isPublication());
|
60
|
Assert.assertFalse("Article must not be publication", ReferenceType.Article.isPublication());
|
61
|
Assert.assertFalse("BookSection must not be publication", ReferenceType.BookSection.isPublication());
|
62
|
Assert.assertTrue("CdDvd must be publication", ReferenceType.CdDvd.isPublication());
|
63
|
Assert.assertTrue("Generic must be publication", ReferenceType.Generic.isPublication());
|
64
|
Assert.assertTrue("Database must be publication", ReferenceType.Database.isPublication());
|
65
|
Assert.assertFalse("InProceedings must not be publication", ReferenceType.InProceedings.isPublication());
|
66
|
Assert.assertTrue("Journal must be publication", ReferenceType.Journal.isPublication());
|
67
|
Assert.assertTrue("Map must be publication", ReferenceType.Map.isPublication());
|
68
|
Assert.assertFalse("Patent must not be publication", ReferenceType.Patent.isPublication());
|
69
|
Assert.assertFalse("PersonalCommunication must not be publication", ReferenceType.PersonalCommunication.isPublication());
|
70
|
Assert.assertTrue("PrintSeries must be publication", ReferenceType.PrintSeries.isPublication());
|
71
|
Assert.assertTrue("Report must be publication", ReferenceType.Report.isPublication());
|
72
|
Assert.assertTrue("Thesis must be publication", ReferenceType.Thesis.isPublication());
|
73
|
Assert.assertTrue("WebPage must be publication", ReferenceType.WebPage.isPublication());
|
74
|
}
|
75
|
|
76
|
|
77
|
@Test
|
78
|
public void testIsVolumeReference(){
|
79
|
Assert.assertTrue("Proceedings must be volume reference", ReferenceType.Proceedings.isVolumeReference());
|
80
|
Assert.assertTrue("Book must be volume reference", ReferenceType.Book.isVolumeReference());
|
81
|
Assert.assertTrue("Article must be volume reference", ReferenceType.Article.isVolumeReference());
|
82
|
Assert.assertFalse("BookSection must not be volume reference", ReferenceType.BookSection.isVolumeReference());
|
83
|
Assert.assertFalse("CdDvd must not be volume reference", ReferenceType.CdDvd.isVolumeReference());
|
84
|
Assert.assertTrue("Generic must be volume reference", ReferenceType.Generic.isVolumeReference());
|
85
|
Assert.assertFalse("Database must not be volume reference", ReferenceType.Database.isVolumeReference());
|
86
|
Assert.assertFalse("InProceedings must not be volume reference", ReferenceType.InProceedings.isVolumeReference());
|
87
|
Assert.assertFalse("Journal must not be volume reference", ReferenceType.Journal.isVolumeReference());
|
88
|
Assert.assertFalse("Map must not be volume reference", ReferenceType.Map.isVolumeReference());
|
89
|
Assert.assertFalse("Patent must not be volume reference", ReferenceType.Patent.isVolumeReference());
|
90
|
Assert.assertFalse("PersonalCommunication must not be volume reference", ReferenceType.PersonalCommunication.isVolumeReference());
|
91
|
Assert.assertFalse("PrintSeries must not be volume reference", ReferenceType.PrintSeries.isVolumeReference());
|
92
|
Assert.assertFalse("Report must not be volume reference", ReferenceType.Report.isVolumeReference());
|
93
|
Assert.assertFalse("Thesis must not be volume reference", ReferenceType.Thesis.isVolumeReference());
|
94
|
Assert.assertFalse("WebPage must not be volume reference", ReferenceType.WebPage.isVolumeReference());
|
95
|
}
|
96
|
|
97
|
|
98
|
@Test
|
99
|
public void testIsSection(){
|
100
|
Assert.assertTrue("Proceedings must be section", ReferenceType.Proceedings.isSection());
|
101
|
Assert.assertTrue("Book must be section", ReferenceType.Book.isSection());
|
102
|
Assert.assertTrue("Article must be section", ReferenceType.Article.isSection());
|
103
|
Assert.assertTrue("BookSection must be section", ReferenceType.BookSection.isSection());
|
104
|
Assert.assertFalse("CdDvd must not be section", ReferenceType.CdDvd.isSection());
|
105
|
Assert.assertFalse("Generic must not be section", ReferenceType.Generic.isSection());
|
106
|
Assert.assertFalse("Database must not be section", ReferenceType.Database.isSection());
|
107
|
Assert.assertTrue("InProceedings must be section", ReferenceType.InProceedings.isSection());
|
108
|
Assert.assertFalse("Journal must not be section", ReferenceType.Journal.isSection());
|
109
|
Assert.assertFalse("Map must not be section", ReferenceType.Map.isSection());
|
110
|
Assert.assertFalse("Patent must not be section", ReferenceType.Patent.isSection());
|
111
|
Assert.assertFalse("PersonalCommunication must not be section", ReferenceType.PersonalCommunication.isSection());
|
112
|
Assert.assertFalse("PrintSeries must not be section", ReferenceType.PrintSeries.isSection());
|
113
|
Assert.assertFalse("Report must not be section", ReferenceType.Report.isSection());
|
114
|
Assert.assertFalse("Thesis must not be section", ReferenceType.Thesis.isSection());
|
115
|
Assert.assertFalse("WebPage must not be section", ReferenceType.WebPage.isSection());
|
116
|
}
|
117
|
}
|