Revision 26b856f8
Added by Andreas Müller over 1 year ago
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java | ||
---|---|---|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
@Test |
97 |
//@DataSet("PolytomousKeyTest.readPolytmousKeyData.xml") |
|
98 | 97 |
public void readPolytmousKeyData() { |
99 | 98 |
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class); |
100 | 99 |
Set<Taxon> taxonomicScope = pKey.getTaxonomicScope(); |
... | ... | |
105 | 104 |
Assert.assertEquals(tsItr.hasNext(), false); |
106 | 105 |
|
107 | 106 |
List<Credit> credits = pKey.getCredits(); |
108 |
AgentBase agent = credits.get(0).getAgent(); |
|
107 |
AgentBase<?> agent = credits.get(0).getAgent();
|
|
109 | 108 |
Assert.assertEquals(agent.getId(),4809); |
110 | 109 |
Assert.assertEquals(agent.getTitleCache(),"R. A. Graham"); |
111 | 110 |
Assert.assertEquals(credits.get(0).getText(),"Credits Text Test"); |
... | ... | |
127 | 126 |
source = sourcesItr.next(); |
128 | 127 |
Assert.assertEquals(source.getId(), 23711); |
129 | 128 |
|
130 |
// TO DO : Added tests for Annotations , Markers
|
|
129 |
// TODO : Add tests for Annotations , Markers
|
|
131 | 130 |
} |
132 | 131 |
|
133 | 132 |
@Test |
134 | 133 |
public void readPolytomousKeyDataFromNodes() { |
135 |
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class); |
|
134 |
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid), PolytomousKey.class);
|
|
136 | 135 |
PolytomousKeyNode rootNode = pKey.getRoot(); |
137 | 136 |
|
138 | 137 |
Assert.assertEquals(2750, rootNode.getId()); |
... | ... | |
183 | 182 |
//grandChildNode = pKey.getRoot().getChildAt(0).getChildAt(0); |
184 | 183 |
//KeyStatement ks = grandChildNode.getStatement(); |
185 | 184 |
Assert.assertTrue(0 != ks.getId()); |
186 |
|
|
187 | 185 |
} |
188 | 186 |
|
189 | 187 |
@Test |
... | ... | |
259 | 257 |
//Assert.assertEquals(pkeynode.getFeature().getId(), feature.getId()); |
260 | 258 |
} |
261 | 259 |
|
262 |
|
|
263 | 260 |
@Test |
264 | 261 |
public void savePolytomousKeyNodeDataWithSameSubKey() { |
265 | 262 |
|
... | ... | |
362 | 359 |
public void deleteSubKeyInPolytomousNode() { |
363 | 360 |
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class); |
364 | 361 |
|
365 |
|
|
366 | 362 |
PolytomousKeyNode rootNode = pKey.getRoot(); |
367 | 363 |
List<PolytomousKeyNode> children = rootNode.getChildren(); |
368 | 364 |
PolytomousKeyNode child = rootNode.getChildAt(0); |
... | ... | |
530 | 526 |
ICdmEntitySession newActiveSession = getCdmEntitySessionManager().newSession(so2, true); |
531 | 527 |
Assert.assertFalse(activeSession.equals(newActiveSession)); |
532 | 528 |
thread.unblock(); |
533 |
|
|
534 | 529 |
} |
535 | 530 |
} |
Also available in: Unified diff
cleanup