Revision 5d6e72c2
Added by Andreas Müller almost 2 years ago
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java | ||
---|---|---|
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
@Test |
134 |
@Ignore //ignore preliminary to allow full build |
|
135 | 134 |
public void readPolytomousKeyDataFromNodes() { |
136 | 135 |
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class); |
137 | 136 |
PolytomousKeyNode rootNode = pKey.getRoot(); |
... | ... | |
141 | 140 |
Assert.assertEquals(2751, rootNode.getChildAt(0).getId()); |
142 | 141 |
Assert.assertEquals(rootNode.getId(), rootNode.getChildAt(0).getParent().getId()); |
143 | 142 |
Assert.assertEquals(pKey.getId(), rootNode.getKey().getId()); |
144 |
Integer sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(0), "sortIndex");
|
|
145 |
Assert.assertEquals(new Integer(0), sortIndex);
|
|
143 |
//here was the explicit sortindex field test before, but this field does not exist anymore since #3722 and #10067 was fixed
|
|
144 |
Assert.assertEquals(0, rootNode.getIndex(rootNode.getChildAt(0)));
|
|
146 | 145 |
String statement = "Capitula without ligulate ray-florets; leaves entire or subentire"; |
147 | 146 |
Assert.assertEquals(statement, rootNode.getChildAt(0).getStatement().getLabelText(Language.ENGLISH())); |
148 | 147 |
|
149 | 148 |
Assert.assertEquals(2753, rootNode.getChildAt(1).getId()); |
150 | 149 |
Assert.assertEquals(rootNode.getId(), rootNode.getChildAt(1).getParent().getId()); |
151 | 150 |
Assert.assertEquals(pKey.getId(), rootNode.getChildAt(1).getKey().getId()); |
152 |
sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(1), "sortIndex");
|
|
153 |
Assert.assertEquals(new Integer(1), sortIndex);
|
|
151 |
//here was the explicit sortindex field test before, but this field does not exist anymore since #3722 and #10067 was fixed
|
|
152 |
Assert.assertEquals(1, rootNode.getIndex(rootNode.getChildAt(1)));
|
|
154 | 153 |
statement = "Capitula with ligulate ray-florets; leaves pinnatisect"; |
155 | 154 |
Assert.assertEquals(statement, rootNode.getChildAt(1).getStatement().getLabelText(Language.ENGLISH())); |
156 | 155 |
|
157 | 156 |
Assert.assertEquals(2754, rootNode.getChildAt(1).getChildAt(0).getId()); |
158 | 157 |
Assert.assertEquals(rootNode.getChildAt(1).getId(), rootNode.getChildAt(1).getChildAt(0).getParent().getId()); |
159 | 158 |
Assert.assertEquals(pKey.getId(), rootNode.getChildAt(1).getChildAt(0).getKey().getId()); |
160 |
sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(1).getChildAt(0), "sortIndex");
|
|
161 |
Assert.assertEquals(new Integer(0), sortIndex);
|
|
159 |
//here was the explicit sortindex field test before, but this field does not exist anymore since #3722 and #10067 was fixed
|
|
160 |
Assert.assertEquals(0, rootNode.getChildAt(1).getIndex(rootNode.getChildAt(1).getChildAt(0)));
|
|
162 | 161 |
statement = "Ray-florets yellow"; |
163 | 162 |
Assert.assertEquals(statement, rootNode.getChildAt(1).getChildAt(0).getStatement().getLabelText(Language.ENGLISH())); |
164 | 163 |
Assert.assertEquals("Achillea arabica Kotschy sec. Cyprus", rootNode.getChildAt(1).getChildAt(0).getChildAt(0).getTaxon().getTitleCache()); |
Also available in: Unified diff
ref #10067, ref #3722 reenable and adapt readPolytomousKeyDataFromNodes() test