public abstract class AbstractSourceCodeAwareNodeProcessingTest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected File |
basedir |
static String |
DEFAULT_EMPTY_NAMESPACE_SYSTEM_ID
Default systemId for the empty namespace.
|
protected SearchableDocumentation |
docs |
protected JAXBContext |
jaxbContext |
protected BufferingLog |
log |
protected SortedMap<String,Document> |
namespace2DocumentMap |
protected SortedMap<String,String> |
namespace2GeneratedSchemaMap |
protected Map<String,String> |
namespace2SystemIdMap |
protected File |
testJavaDir |
protected SortedMap<String,Throwable> |
xsdGenerationLog |
protected List<String> |
xsdGenerationWarnings |
| Constructor and Description |
|---|
AbstractSourceCodeAwareNodeProcessingTest() |
| Modifier and Type | Method and Description |
|---|---|
protected static org.custommonkey.xmlunit.Diff |
compareXmlIgnoringWhitespace(String expected,
String actual)
Compares XML documents provided by the two Readers.
|
protected Document |
createDocument(String xmlContent)
Creates a DOM Document from the supplied XML.
|
protected File |
getBasedir() |
protected abstract List<Class<?>> |
getJaxbAnnotatedClassesForJaxbContext() |
protected void |
onAcceptedAttribute(Node anAttribute)
Event callback when a nodeProcessor has accepted an Attribute.
|
protected void |
onAcceptedNode(Node aNode)
Event callback when a nodeProcessor has accepted a Node.
|
static String |
printDocument(Document doc)
Prints the content of the supplied DOM Document as a string.
|
void |
process(Node node,
boolean recurseToChildren,
NodeProcessor visitor)
Drives the supplied visitor to process the provided Node and all its children, should the recurseToChildren flag
be set to
true. |
protected static String |
readFully(String path)
Utility method to read all (string formatted) data from the given classpath-relative
file and return the data as a string.
|
void |
setupSharedState() |
public static final String DEFAULT_EMPTY_NAMESPACE_SYSTEM_ID
protected BufferingLog log
protected SearchableDocumentation docs
protected final File basedir
protected final File testJavaDir
protected JAXBContext jaxbContext
public AbstractSourceCodeAwareNodeProcessingTest()
protected abstract List<Class<?>> getJaxbAnnotatedClassesForJaxbContext()
protected File getBasedir()
protected final Document createDocument(String xmlContent)
xmlContent - The non-empty XML which should be converted into a Document.public final void process(Node node, boolean recurseToChildren, NodeProcessor visitor)
true. All attributes of the current node are processed before recursing to children (i.e.
breadth first recursion).node - The Node to process.recurseToChildren - if true, processes all children of the supplied node recursively.visitor - The NodeProcessor instance which should process the nodes.protected void onAcceptedNode(Node aNode)
aNode - the accepted Nodeprotected void onAcceptedAttribute(Node anAttribute)
anAttribute - the accepted attribute.protected static String readFully(String path)
path - The classpath-relative file path.protected static org.custommonkey.xmlunit.Diff compareXmlIgnoringWhitespace(String expected, String actual) throws SAXException, IOException
expected - The expected document data.actual - The actual document data.SAXException - If a SAXException was raised during parsing of the two Documents.IOException - If an I/O-related exception was raised while acquiring the data from the Readers.Copyright © 2005–2015 MojoHaus. All rights reserved.