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