public abstract class XmlTest<T> extends Object
Constructor and Description |
---|
XmlTest(T sampleObject,
Object sampleXml,
String schemaFile) |
public void setUp()
protected T getSampleObject()
protected String getSampleXml() throws IOException
IOException
protected ByteArrayInputStream getSampleXmlInputStream() throws IOException
IOException
protected String getSchemaFile()
protected boolean ignoreNamespace(String namespace)
protected boolean ignorePrefix(String prefix)
protected boolean ignoreDifference(org.custommonkey.xmlunit.Difference d)
protected String marshalToXmlWithCastor()
protected String marshalToXmlWithJaxb()
public void marshalCastorAndCompareToXml() throws Exception
Exception
public void marshalJaxbAndCompareToXml() throws Exception
Exception
public void unmarshalXmlAndCompareToCastor() throws Exception
Exception
public void unmarshalCastorMarshalCastor() throws Exception
Exception
public void marshalCastorUnmarshalCastor() throws Exception
Exception
public void unmarshalXmlAndCompareToJaxb() throws Exception
Exception
public void marshalCastorUnmarshalJaxb() throws Exception
Exception
public void marshalJaxbUnmarshalCastor() throws Exception
Exception
public void validateCastorObjectAgainstSchema() throws Exception
Exception
public void validateJaxbXmlAgainstSchema() throws Exception
Exception
public static <T> String marshalToXmlWithJaxb(T sampleObject)
public static void assertXpathDoesNotMatch(String xml, String expression) throws XPathExpressionException
XPathExpressionException
public static void assertXpathDoesNotMatch(String description, String xml, String expression) throws XPathExpressionException
XPathExpressionException
public static void assertXpathMatches(String xml, String expression) throws XPathExpressionException
XPathExpressionException
public static void assertXpathMatches(String description, String xml, String expression) throws XPathExpressionException
XPathExpressionException
protected List<org.custommonkey.xmlunit.Difference> getDifferences(String xmlA, String xmlB)
protected static NodeList xpathGetNodesMatching(String xml, String expression) throws XPathExpressionException
XPathExpressionException
Copyright © 2016. All rights reserved.