1 package com.thoughtworks.xstream.io.xml; 2 3 import nu.xom.Element; 4 5 public class XomWriterTest extends AbstractXMLWriterTest { 6 7 private Element root; 8 9 protected void setUp() throws Exception { 10 super.setUp(); 11 root = new Element("my-root"); 12 writer = new XomWriter(root); 13 } 14 15 protected void assertXmlProducedIs(String expected) { 16 assertEquals(1, root.getChildCount()); 17 String actual = root.getChild(0).toXML(); 18 actual = actual.replaceAll(" />", "/>"); 19 assertEquals(expected, actual); 20 } 21 22 } 24 | Popular Tags |