1 package com.thoughtworks.xstream.io.xml; 2 3 import org.jdom.output.XMLOutputter; 4 5 import java.util.List ; 6 7 public class JDomWriterTest extends AbstractXMLWriterTest { 8 9 private List result; 10 11 protected void setUp() throws Exception { 12 super.setUp(); 13 writer = new JDomWriter(); 14 result = ((JDomWriter)writer).getResult(); 15 } 16 17 protected void assertXmlProducedIs(String expected) { 18 XMLOutputter outputter = new XMLOutputter(); 19 String actual = outputter.outputString(result); 20 actual = actual.replaceAll("
", "
"); actual = actual.replaceAll("\r\n", "\n"); 22 actual = actual.replaceAll(" />", "/>"); 23 assertEquals(expected, actual); 24 } 25 26 } 28 | Popular Tags |