KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > xstream > io > xml > XomWriterTest


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 JavaDoc {
10         super.setUp();
11         root = new Element("my-root");
12         writer = new XomWriter(root);
13     }
14
15     protected void assertXmlProducedIs(String JavaDoc expected) {
16         assertEquals(1, root.getChildCount());
17         String JavaDoc actual = root.getChild(0).toXML();
18         actual = actual.replaceAll(" />", "/>");
19         assertEquals(expected, actual);
20     }
21
22     // inherits tests from superclass
23
}
24
Popular Tags