SPR-6907 - JibxMarshaller - provide access to jibx's writeDocType
This commit is contained in:
@@ -75,6 +75,16 @@ public class JibxMarshallerTests extends AbstractMarshallerTests {
|
||||
writer.toString().startsWith("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\"?>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void dtd() throws Exception {
|
||||
((JibxMarshaller) marshaller).setDocTypeRootElementName("flights");
|
||||
((JibxMarshaller) marshaller).setDocTypeSystemId("flights.dtd");
|
||||
StringWriter writer = new StringWriter();
|
||||
marshaller.marshal(flights, new StreamResult(writer));
|
||||
assertTrue("doc type not written",
|
||||
writer.toString().contains("<!DOCTYPE flights SYSTEM \"flights.dtd\">"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSupports() throws Exception {
|
||||
assertTrue("JibxMarshaller does not support Flights", marshaller.supports(Flights.class));
|
||||
|
||||
Reference in New Issue
Block a user