1
|
/**
|
2
|
* Copyright (C) 2009 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.service;
|
10
|
|
11
|
import static org.junit.Assert.assertEquals;
|
12
|
import static org.junit.Assert.assertNotNull;
|
13
|
import static org.junit.Assert.assertSame;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
import org.junit.Ignore;
|
17
|
import org.junit.Test;
|
18
|
import org.unitils.spring.annotation.SpringBeanByType;
|
19
|
|
20
|
import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
|
21
|
import eu.etaxonomy.cdm.model.name.Rank;
|
22
|
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
|
23
|
import eu.etaxonomy.cdm.test.integration.CdmIntegrationTest;
|
24
|
|
25
|
/**
|
26
|
* @author a.mueller
|
27
|
*
|
28
|
*/
|
29
|
public class NameServiceImplTest2 extends CdmIntegrationTest {
|
30
|
private static final Logger logger = Logger.getLogger(NameServiceImplTest2.class);
|
31
|
|
32
|
@SpringBeanByType
|
33
|
private INameService service;
|
34
|
|
35
|
/* ******************** TESTS ********************************************/
|
36
|
|
37
|
/**
|
38
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#setDao(eu.etaxonomy.cdm.persistence.dao.name.ITaxonNameDao)}.
|
39
|
*/
|
40
|
@Test
|
41
|
public void testSetDao() {
|
42
|
logger.warn("Not yet implemented");
|
43
|
}
|
44
|
|
45
|
/**
|
46
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#setVocabularyDao(eu.etaxonomy.cdm.persistence.dao.common.ITermVocabularyDao)}.
|
47
|
*/
|
48
|
@Test
|
49
|
public void testSetVocabularyDao() {
|
50
|
logger.warn("Not yet implemented");
|
51
|
}
|
52
|
|
53
|
/**
|
54
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#NameServiceImpl()}.
|
55
|
*/
|
56
|
@Test
|
57
|
public void testNameServiceImpl() {
|
58
|
logger.warn("Not yet implemented");
|
59
|
}
|
60
|
|
61
|
/**
|
62
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#getNamesByName(java.lang.String)}.
|
63
|
*/
|
64
|
@Test
|
65
|
public void testGetNamesByName() {
|
66
|
logger.warn("Not yet implemented");
|
67
|
}
|
68
|
|
69
|
/**
|
70
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#getTaxonNameByUuid(java.util.UUID)}.
|
71
|
*/
|
72
|
@Test
|
73
|
public void testGetTaxonNameByUuid() {
|
74
|
logger.warn("Not yet implemented");
|
75
|
}
|
76
|
|
77
|
/**
|
78
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#saveTaxonName(eu.etaxonomy.cdm.model.name.TaxonNameBase)}.
|
79
|
*/
|
80
|
@Test
|
81
|
public void testSaveTaxonName() {
|
82
|
logger.warn("Not yet implemented");
|
83
|
}
|
84
|
|
85
|
/**
|
86
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#saveTaxonNameAll(java.util.Collection)}.
|
87
|
*/
|
88
|
@Test
|
89
|
public void testSaveTaxonNameAll() {
|
90
|
logger.warn("Not yet implemented");
|
91
|
}
|
92
|
|
93
|
/**
|
94
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#removeTaxon(eu.etaxonomy.cdm.model.name.TaxonNameBase)}.
|
95
|
*/
|
96
|
@Test
|
97
|
public void testRemoveTaxon() {
|
98
|
logger.warn("Not yet implemented");
|
99
|
}
|
100
|
|
101
|
/**
|
102
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#getAllNames(int, int)}.
|
103
|
*/
|
104
|
@Test
|
105
|
public void testGetAllNames() {
|
106
|
logger.warn("Not yet implemented");
|
107
|
}
|
108
|
|
109
|
/**
|
110
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#getRankVocabulary()}.
|
111
|
*/
|
112
|
@Test
|
113
|
public void testGetRankVocabulary() {
|
114
|
OrderedTermVocabulary<Rank> rankVocabulary = service.getRankVocabulary();
|
115
|
assertNotNull(rankVocabulary);
|
116
|
assertEquals(62, rankVocabulary.size());
|
117
|
Rank highestRank = rankVocabulary.getHighestTerm();
|
118
|
assertEquals(Rank.EMPIRE(), highestRank);
|
119
|
assertEquals(Rank.DOMAIN(), rankVocabulary.getNextLowerTerm(highestRank));
|
120
|
assertSame(Rank.EMPIRE(), highestRank);
|
121
|
assertSame(Rank.DOMAIN(), rankVocabulary.getNextLowerTerm(highestRank));
|
122
|
}
|
123
|
|
124
|
/**
|
125
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#getTypeDesignationVocabulary()}.
|
126
|
*/
|
127
|
@Test
|
128
|
public void testGetTypeDesignationVocabulary() {
|
129
|
OrderedTermVocabulary<SpecimenTypeDesignationStatus> typeDesignationVocabulary =
|
130
|
service.getSpecimenTypeDesignationVocabulary();
|
131
|
assertNotNull(typeDesignationVocabulary);
|
132
|
assertEquals(62, typeDesignationVocabulary.size());
|
133
|
SpecimenTypeDesignationStatus highestType = typeDesignationVocabulary.getHighestTerm();
|
134
|
assertEquals(SpecimenTypeDesignationStatus.EPITYPE(), highestType);
|
135
|
assertEquals(SpecimenTypeDesignationStatus.HOLOTYPE(), typeDesignationVocabulary.getNextLowerTerm(highestType));
|
136
|
assertSame(SpecimenTypeDesignationStatus.EPITYPE(), highestType);
|
137
|
assertSame(SpecimenTypeDesignationStatus.HOLOTYPE(), typeDesignationVocabulary.getNextLowerTerm(highestType));
|
138
|
}
|
139
|
|
140
|
/**
|
141
|
* Test method for {@link eu.etaxonomy.cdm.api.service.NameServiceImpl#generateTitleCache()}.
|
142
|
*/
|
143
|
@Test
|
144
|
public void testGenerateTitleCache() {
|
145
|
logger.warn("Not yet implemented");
|
146
|
}
|
147
|
|
148
|
}
|