use of org.apache.axiom.testutils.io.InstrumentedWriter in project webservices-axiom by apache.
the class TestWriteTextTo method runTest.
@Override
protected void runTest() throws Throwable {
OMFactory factory = metaFactory.getOMFactory();
OMElement element = factory.createOMElement(new QName("a"));
factory.createOMText(element, "test");
StringWriter sw = new StringWriter();
InstrumentedWriter out = new InstrumentedWriter(sw);
element.writeTextTo(out, true);
assertEquals(element.getText(), sw.toString());
assertFalse(out.isClosed());
}
Aggregations