1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.cdm.model.name;
|
12
|
|
13
|
import static org.junit.Assert.assertEquals;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import org.apache.log4j.Logger;
|
17
|
import org.junit.BeforeClass;
|
18
|
import org.junit.Test;
|
19
|
|
20
|
import eu.etaxonomy.cdm.model.common.DefaultTermInitializer;
|
21
|
import eu.etaxonomy.cdm.test.unit.EntityTestBase;
|
22
|
|
23
|
/**
|
24
|
* @author a.babadshanjan
|
25
|
* @created 24.03.2009
|
26
|
* @version 1.0
|
27
|
*/
|
28
|
public class NameTypeDesignationStatusTest extends EntityTestBase {
|
29
|
@SuppressWarnings("unused")
|
30
|
private static final Logger logger = Logger.getLogger(NameTypeDesignationStatusTest.class);
|
31
|
|
32
|
private static final UUID uuidAutomatic = UUID.fromString("e89d8b21-615a-4602-913f-1625bf39a69f");
|
33
|
private static final UUID uuidFirstRevisor = UUID.fromString("a14ec046-c48f-4a73-939f-bd57880c7565");
|
34
|
private static final UUID uuidMonotypy = UUID.fromString("3fc639b2-9a64-45f8-9a81-657a4043ad74");
|
35
|
private static final UUID uuidNotApplicable = UUID.fromString("91a9d6a9-7754-41cd-9f7e-be136f599f7e");
|
36
|
private static final UUID uuidOriginalDesignation = UUID.fromString("40032a44-973b-4a64-b25e-76f86c3a753c");
|
37
|
private static final UUID uuidPresentDesignation = UUID.fromString("e5f38f5d-995d-4470-a036-1a9792a543fc");
|
38
|
private static final UUID uuidSubsequentMonotypy = UUID.fromString("2b5806d8-31b0-406e-a32a-4adac0c89ae4");
|
39
|
private static final UUID uuidSubsequentDesignation = UUID.fromString("3e449e7d-a03c-4431-a7d3-aa258406f6b2");
|
40
|
private static final UUID uuidTautonymy = UUID.fromString("84521f09-3e10-43f5-aa6f-2173a55a6790");
|
41
|
|
42
|
@BeforeClass
|
43
|
public static void setUp() {
|
44
|
DefaultTermInitializer vocabularyStore = new DefaultTermInitializer();
|
45
|
vocabularyStore.initialize();
|
46
|
}
|
47
|
|
48
|
@Test
|
49
|
public void testNameTypeDesignationStatusStringString() {
|
50
|
NameTypeDesignationStatus term = new NameTypeDesignationStatus("term", "label", null);
|
51
|
assertEquals("label", term.getLabel());
|
52
|
}
|
53
|
|
54
|
@Test
|
55
|
public void testAUTOMATIC() {
|
56
|
assertEquals(uuidAutomatic, NameTypeDesignationStatus.AUTOMATIC().getUuid());
|
57
|
}
|
58
|
|
59
|
@Test
|
60
|
public void testMONOTYPY() {
|
61
|
assertEquals(uuidMonotypy, NameTypeDesignationStatus.MONOTYPY().getUuid());
|
62
|
}
|
63
|
|
64
|
@Test
|
65
|
public void testNOT_APPLICABLE() {
|
66
|
assertEquals(uuidNotApplicable, NameTypeDesignationStatus.NOT_APPLICABLE().getUuid());
|
67
|
}
|
68
|
|
69
|
@Test
|
70
|
public void testORIGINAL_DESIGNATION() {
|
71
|
assertEquals(uuidOriginalDesignation, NameTypeDesignationStatus.ORIGINAL_DESIGNATION().getUuid());
|
72
|
}
|
73
|
|
74
|
@Test
|
75
|
public void testPRESENT_DESIGNATION() {
|
76
|
assertEquals(uuidPresentDesignation, NameTypeDesignationStatus.PRESENT_DESIGNATION().getUuid());
|
77
|
}
|
78
|
|
79
|
@Test
|
80
|
public void testSUBSEQUENT_MONOTYPY() {
|
81
|
assertEquals(uuidSubsequentMonotypy, NameTypeDesignationStatus.SUBSEQUENT_MONOTYPY().getUuid());
|
82
|
}
|
83
|
|
84
|
@Test
|
85
|
public void testSUBSEQUENT_DESIGNATION() {
|
86
|
assertEquals(uuidSubsequentDesignation, NameTypeDesignationStatus.SUBSEQUENT_DESIGNATION().getUuid());
|
87
|
}
|
88
|
|
89
|
@Test
|
90
|
public void testTAUTONOMY() {
|
91
|
assertEquals(uuidTautonymy, NameTypeDesignationStatus.TAUTONYMY().getUuid());
|
92
|
}
|
93
|
|
94
|
}
|