6364656667686970717273
/** * Check that getAncestor finds the existing ancestor. */ public void testGetAncestorExists() throws Exception { AncestorContainment constraint = createConstraint("ancestor", "unused", true); Element element = buildLPDMODOM(
8990919293949596979899
/** * Check that getAncestor fails to find the non-existent ancestor. */ public void testGetAncestorDoesNotExist() throws Exception { AncestorContainment constraint = createConstraint("ancestor", "unused", true); Element element = buildLPDMODOM(
210211212213214215216217218219
* @return the constraint */ protected AncestorContainment createConstraint(String ancestor, String key, boolean required) { return new AncestorContainment(ancestor, MCSNamespace.LPDM.getURI(), (key == null ? "dummy" : key), required); }