public void testXMLExport() throws DataConversionException { Element e = getLocalWorker().provideXML(); assertEquals(XScufl.XScuflNS, e.getNamespace()); assertEquals("extensions", e.getName()); Element flattenlist = e.getChild("flattenlist", XScufl.XScuflNS); assertNotNull("Element <flattenlist> not found", flattenlist); Attribute depth = flattenlist.getAttribute("depth", XScufl.XScuflNS); assertNotNull("Attribute depth='' not found", depth); assertEquals(2, depth.getIntValue()); }
public void testXMLImport() { FlattenList flattener = getLocalWorker(); flattener.setDepth(1337); Element e = flattener.provideXML(); FlattenList flattener2 = getLocalWorker(); flattener2.consumeXML(e); assertEquals("Did not consume XML correctly", 1337, flattener2.getDepth()); }