}
@Test
- @Ignore //ignore preliminary to allow full build
public void readPolytomousKeyDataFromNodes() {
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
PolytomousKeyNode rootNode = pKey.getRoot();
Assert.assertEquals(2751, rootNode.getChildAt(0).getId());
Assert.assertEquals(rootNode.getId(), rootNode.getChildAt(0).getParent().getId());
Assert.assertEquals(pKey.getId(), rootNode.getKey().getId());
- Integer sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(0), "sortIndex");
- Assert.assertEquals(new Integer(0), sortIndex);
+ //here was the explicit sortindex field test before, but this field does not exist anymore since #3722 and #10067 was fixed
+ Assert.assertEquals(0, rootNode.getIndex(rootNode.getChildAt(0)));
String statement = "Capitula without ligulate ray-florets; leaves entire or subentire";
Assert.assertEquals(statement, rootNode.getChildAt(0).getStatement().getLabelText(Language.ENGLISH()));
Assert.assertEquals(2753, rootNode.getChildAt(1).getId());
Assert.assertEquals(rootNode.getId(), rootNode.getChildAt(1).getParent().getId());
Assert.assertEquals(pKey.getId(), rootNode.getChildAt(1).getKey().getId());
- sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(1), "sortIndex");
- Assert.assertEquals(new Integer(1), sortIndex);
+ //here was the explicit sortindex field test before, but this field does not exist anymore since #3722 and #10067 was fixed
+ Assert.assertEquals(1, rootNode.getIndex(rootNode.getChildAt(1)));
statement = "Capitula with ligulate ray-florets; leaves pinnatisect";
Assert.assertEquals(statement, rootNode.getChildAt(1).getStatement().getLabelText(Language.ENGLISH()));
Assert.assertEquals(2754, rootNode.getChildAt(1).getChildAt(0).getId());
Assert.assertEquals(rootNode.getChildAt(1).getId(), rootNode.getChildAt(1).getChildAt(0).getParent().getId());
Assert.assertEquals(pKey.getId(), rootNode.getChildAt(1).getChildAt(0).getKey().getId());
- sortIndex = (Integer)getFieldValueViaReflection(rootNode.getChildAt(1).getChildAt(0), "sortIndex");
- Assert.assertEquals(new Integer(0), sortIndex);
+ //here was the explicit sortindex field test before, but this field does not exist anymore since #3722 and #10067 was fixed
+ Assert.assertEquals(0, rootNode.getChildAt(1).getIndex(rootNode.getChildAt(1).getChildAt(0)));
statement = "Ray-florets yellow";
Assert.assertEquals(statement, rootNode.getChildAt(1).getChildAt(0).getStatement().getLabelText(Language.ENGLISH()));
Assert.assertEquals("Achillea arabica Kotschy sec. Cyprus", rootNode.getChildAt(1).getChildAt(0).getChildAt(0).getTaxon().getTitleCache());