|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.splunk.modularinput.ModularInputTestCase
public class ModularInputTestCase
Constructor Summary | |
---|---|
ModularInputTestCase()
|
Method Summary | |
---|---|
void |
assertXmlEqual(org.w3c.dom.Document expected,
org.w3c.dom.Document found)
Assert whether two org.w3c.dom.Document objects contain identical XML, ignoring whitespace. |
void |
assertXmlEqual(org.w3c.dom.Node expected,
org.w3c.dom.Node found)
Assert whether two org.w3c.dom.Node objects contain identical XML, ignoring whitespace. |
java.lang.String |
nodeToXml(org.w3c.dom.Node node)
Transform the given org.w3c.dom.Node object into a String containing the corresponding XML. |
static void |
removeBlankTextNodes(org.w3c.dom.Element node)
XML parsing may introduce text nodes containing only white space between elements. |
org.w3c.dom.Document |
resourceToXmlDocument(java.lang.String path)
Open a resource from the Splunk SDK for Java project and parse it into an org.w3c.dom.Document object. |
org.w3c.dom.Document |
stringToXmlDocument(java.lang.String xml)
Parse XML in a string into an org.w3c.dom.Document object. |
void |
testCoercionMethods()
Test the methods on SingleValueParameter to coerce its value to a boolean or various kinds of numbers. |
void |
testNormalizeBoolean()
Tries the known cases supported by XmlUtil.normalizeBoolean, and asserts that it throws an error when passed an unknown case. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModularInputTestCase()
Method Detail |
---|
public static void removeBlankTextNodes(org.w3c.dom.Element node)
node
- a org.w3c.dom.Node object containing XML.public void assertXmlEqual(org.w3c.dom.Node expected, org.w3c.dom.Node found) throws javax.xml.transform.TransformerException, javax.xml.parsers.ParserConfigurationException
expected
- an org.w3c.dom.Node object containing the expected XML document.found
- an org.w3c.dom.Node object containing the XML document actually produced.
javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException
public void assertXmlEqual(org.w3c.dom.Document expected, org.w3c.dom.Document found) throws javax.xml.transform.TransformerException, javax.xml.parsers.ParserConfigurationException
expected
- an org.w3c.dom.Document object containing the expected XML document.found
- an org.w3c.dom.Document object containing the XML document actually produced.
javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException
public org.w3c.dom.Document resourceToXmlDocument(java.lang.String path)
path
- a path relative to the test directory of the SDK.
public org.w3c.dom.Document stringToXmlDocument(java.lang.String xml)
xml
- a String containing XML.
public java.lang.String nodeToXml(org.w3c.dom.Node node) throws javax.xml.transform.TransformerException, javax.xml.parsers.ParserConfigurationException
node
- the org.w3c.dom.Node object to serialize.
javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException
public void testNormalizeBoolean() throws MalformedDataException
MalformedDataException
public void testCoercionMethods() throws MalformedDataException
MalformedDataException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |