eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.h2.db -text
eu.etaxonomy.taxeditor/.classpath -text
eu.etaxonomy.taxeditor/.project -text
eu.etaxonomy.taxeditor/deploy_nightly.sh -text
polytomousKeyService.delete(subKey);
// since subKey was not initialized before the delete, an attempt
- // to initialize it after will lead to an npe
+ // to initialize it after will lead to an NPE
try {
PolytomousKeyNode subKeyRootNode = subKey.getRoot();
Assert.fail("A NullPointerException indicating null root node should be thrown here");
} catch(NullPointerException npe) {
}
-
+ // retrieving subkey shows its null
subKey = CdmBase.deproxy(polytomousKeyService.find(subKeyUuid),PolytomousKey.class);
Assert.assertNull(subKey);
rootNode = pKey.getRoot();
child = rootNode.getChildAt(0);
subKey = child.getSubkey();
-
+ // subkey will not be null, because the delete functionality of the subkey
+ // does not currently delete it from a polytomous key node
+ Assert.assertNotNull(subKey);
// after reloading the object graph, accessing subKey should throw a null pointer exception
try {
PolytomousKeyNode subKeyRootNode = subKey.getRoot();
PolytomousKeyNode rootNode = pKey.getRoot();
PolytomousKeyNode child = rootNode.getChildAt(0);
- polytomousKeyNodeService.delete(child);
+ polytomousKeyNodeService.delete(child, true, true);
}
@Test