1 package com.thoughtworks.xstream.io.xml; 2 3 import org.dom4j.DocumentFactory; 4 import org.dom4j.Document; 5 import org.dom4j.io.OutputFormat; 6 import com.thoughtworks.xstream.io.HierarchicalStreamDriver; 7 8 import java.io.Writer ; 9 import java.io.StringWriter ; 10 11 public class Dom4JWriterTest extends AbstractXMLWriterTest { 12 13 private StringWriter out; 14 15 protected void setUp() throws Exception { 16 super.setUp(); 17 18 Dom4JDriver driver = new Dom4JDriver(); 19 20 OutputFormat format = OutputFormat.createCompactFormat(); 21 format.setSuppressDeclaration(true); 22 driver.setOutputFormat(format); 23 24 out = new StringWriter (); 25 writer = driver.createWriter(out); 26 } 27 28 protected void assertXmlProducedIs(String expected) { 29 writer.close(); 30 String actual = out.toString().trim(); 31 assertEquals(expected, actual); 32 } 33 34 36 public void testEscapesWhitespaceCharacters() { 37 } 40 } 41 | Popular Tags |