Base class for modules which produce HTML
code as output. These modules have to implement
HTMLOutputModule.getOutput . The HTML code is provided
in different formats, e.g. as parsed XML
documents.
Returns the output as a BufferedReader.
the output
getOutputAsJDOMDocument
public org.jdom.Document getOutputAsJDOMDocument()(Code)
Parses the output with the NekoHTML parser and returns it
as a JDOM XML document. Throws a
NestedApplicationException
if the output is not parsable. NekoHTML is quite good in fixing sloppy
HTML code. If you want to use a different parser configuration,
you can use the method
com.mockrunner.util.web.XmlUtil.parse
to parse the string output yourself. Please note that
HTML parsing is not very fast and may slow down
your test suite.
the output as org.jdom.Document throws: RuntimeException - if a parsing error occurs
Parses the output with the NekoHTML parser and returns it
as a W3C XML document. Throws a
NestedApplicationException
if the output is not parsable. NekoHTML is quite good in fixing sloppy
HTML code. If you want to use a different parser configuration,
you can use the method
com.mockrunner.util.web.XmlUtil.parse
to parse the string output yourself. Please note that
HTML parsing is not very fast and may slow down
your test suite.
the output as org.w3c.dom.Document throws: RuntimeException - if a parsing error occurs
Parses the output with the NekoHTML parser and returns it
as fixed, wellformed XML. Throws a
NestedApplicationException
if the output is not parsable. NekoHTML is quite good in fixing sloppy
HTML code. If you want to use a different parser configuration,
you can use the method
com.mockrunner.util.web.XmlUtil.parse
to parse the string output yourself. Please note that
HTML parsing is not very fast and may slow down
your test suite.
the output as wellformed XML throws: RuntimeException - if a parsing error occurs
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)(Code)
public void verifyOutput(String expectedOutput)(Code)
Verifies the tag output.
Parameters: expectedOutput - the expected output. throws: VerifyFailedException - if verification fails
verifyOutputContains
public void verifyOutputContains(String expectedOutput)(Code)
Verifies if the output contains the specified data.
Parameters: expectedOutput - the data throws: VerifyFailedException - if verification fails
verifyOutputRegularExpression
public void verifyOutputRegularExpression(String expression)(Code)
Verifies if the output matches the specified regular expression.
Parameters: expression - the data throws: VerifyFailedException - if verification fails
Methods inherited from com.mockrunner.base.WebTestModule