1
|
package eu.etaxonomy.cdm.model.name;
|
2
|
|
3
|
import static org.junit.Assert.*;
|
4
|
|
5
|
import org.junit.After;
|
6
|
import org.junit.AfterClass;
|
7
|
import org.junit.Before;
|
8
|
import org.junit.BeforeClass;
|
9
|
import org.junit.Test;
|
10
|
import org.apache.log4j.Logger;
|
11
|
|
12
|
import eu.etaxonomy.cdm.test.unit.EntityTestBase;
|
13
|
|
14
|
|
15
|
public class BotanicalNameTest extends EntityTestBase{
|
16
|
private static final Logger logger = Logger.getLogger(BotanicalNameTest.class);
|
17
|
|
18
|
private BotanicalName botanicalName1;
|
19
|
private BotanicalName botanicalName2;
|
20
|
|
21
|
@BeforeClass
|
22
|
public static void setUpBeforeClass() throws Exception {
|
23
|
}
|
24
|
|
25
|
@AfterClass
|
26
|
public static void tearDownAfterClass() throws Exception {
|
27
|
}
|
28
|
|
29
|
@Before
|
30
|
public void setUp() throws Exception {
|
31
|
botanicalName1 = new BotanicalName();
|
32
|
botanicalName2 = new BotanicalName();
|
33
|
}
|
34
|
|
35
|
@After
|
36
|
public void tearDown() throws Exception {
|
37
|
}
|
38
|
|
39
|
/****** TESTS *******************************/
|
40
|
|
41
|
@Test
|
42
|
public final void testPARSED_NAME() {
|
43
|
String fullName = "Abies alba subsp. beta (L.) Mill.";
|
44
|
BotanicalName name = BotanicalName.PARSED_NAME(fullName);
|
45
|
assertFalse(name.getHasProblem());
|
46
|
assertEquals("beta", name.getInfraSpecificEpithet());
|
47
|
}
|
48
|
|
49
|
@Test
|
50
|
public final void testBotanicalName() {
|
51
|
logger.warn("Not yet implemented"); // TODO
|
52
|
}
|
53
|
|
54
|
@Test
|
55
|
public final void testBotanicalNameRank() {
|
56
|
logger.warn("Not yet implemented"); // TODO
|
57
|
}
|
58
|
|
59
|
@Test
|
60
|
public final void testBotanicalNameRankStringStringStringAgentINomenclaturalReferenceString() {
|
61
|
logger.warn("Not yet implemented"); // TODO
|
62
|
}
|
63
|
|
64
|
@Test
|
65
|
public final void testGetHybridRelationships() {
|
66
|
logger.warn("Not yet implemented"); // TODO
|
67
|
}
|
68
|
|
69
|
@Test
|
70
|
public final void testSetHybridRelationships() {
|
71
|
logger.warn("Not yet implemented"); // TODO
|
72
|
}
|
73
|
|
74
|
@Test
|
75
|
public final void testAddHybridRelationship() {
|
76
|
logger.warn("Not yet implemented"); // TODO
|
77
|
}
|
78
|
|
79
|
@Test
|
80
|
public final void testRemoveHybridRelationship() {
|
81
|
logger.warn("Not yet implemented"); // TODO
|
82
|
}
|
83
|
|
84
|
@Test
|
85
|
public final void testGetParentRelationships() {
|
86
|
logger.warn("Not yet implemented"); // TODO
|
87
|
}
|
88
|
|
89
|
@Test
|
90
|
public final void testGetChildRelationships() {
|
91
|
logger.warn("Not yet implemented"); // TODO
|
92
|
}
|
93
|
|
94
|
@Test
|
95
|
public final void testIsSetHybridFormula() {
|
96
|
assertFalse(botanicalName1.isHybridFormula());
|
97
|
botanicalName1.setHybridFormula(true);
|
98
|
assertTrue(botanicalName1.isHybridFormula());
|
99
|
botanicalName1.setHybridFormula(false);
|
100
|
assertFalse(botanicalName1.isHybridFormula());
|
101
|
}
|
102
|
|
103
|
@Test
|
104
|
public final void testIsSetMonomHybrid() {
|
105
|
assertFalse(botanicalName1.isMonomHybrid());
|
106
|
botanicalName1.setMonomHybrid(true);
|
107
|
assertTrue(botanicalName1.isMonomHybrid());
|
108
|
botanicalName1.setMonomHybrid(false);
|
109
|
assertFalse(botanicalName1.isMonomHybrid());
|
110
|
}
|
111
|
|
112
|
@Test
|
113
|
public final void testIsSetBinomHybrid() {
|
114
|
assertFalse(botanicalName1.isBinomHybrid());
|
115
|
botanicalName1.setBinomHybrid(true);
|
116
|
assertTrue(botanicalName1.isBinomHybrid());
|
117
|
botanicalName1.setBinomHybrid(false);
|
118
|
assertFalse(botanicalName1.isBinomHybrid());
|
119
|
}
|
120
|
|
121
|
@Test
|
122
|
public final void testIsTrinomHybrid() {
|
123
|
assertFalse(botanicalName1.isTrinomHybrid());
|
124
|
botanicalName1.setTrinomHybrid(true);
|
125
|
assertTrue(botanicalName1.isTrinomHybrid());
|
126
|
botanicalName1.setTrinomHybrid(false);
|
127
|
assertFalse(botanicalName1.isTrinomHybrid());
|
128
|
}
|
129
|
|
130
|
@Test
|
131
|
public final void testIsAnamorphic() {
|
132
|
assertFalse(botanicalName1.isAnamorphic());
|
133
|
botanicalName1.setAnamorphic(true);
|
134
|
assertTrue(botanicalName1.isAnamorphic());
|
135
|
botanicalName1.setAnamorphic(false);
|
136
|
assertFalse(botanicalName1.isAnamorphic());
|
137
|
}
|
138
|
|
139
|
}
|