MXUnit 2.1.3 (Generated: 09/27/2012)

mxunit.framework
Class XPathAssert

WEB-INF.cftags.component
        extended by mxunit.framework.Assert
            extended by mxunit.framework.XPathAssert

public class XPathAssert
extends Assert

Assertions for XML and well formed HTML


Method Summary
 any assertXpath(String xpath, any data, [string text=''], [string message='[runtime expression]'])
 any buildXmlDom(any data, [boolean isUrl='false'])
          Experimental!
 boolean isWrapped(string html)
 string wrapScriptTagInCDATA(string html)
          Regular Expression util wrapper
 
Methods inherited from class mxunit.framework.Assert
mxunit.framework.XPathAssert
 
Methods inherited from class WEB-INF.cftags.component
 

Method Detail

assertXpath

public any assertXpath(String xpath, any data, [string text=''], [string message='[runtime expression]'])

Parameters:
xpath - string representing an xpath expression
data - String or URL to search
text - The text to match against the xpath expression. If omitted, this assertion returns true if any elements of the xpath epxression are found.
message - The mssage to display when this assertion fails

buildXmlDom

public any buildXmlDom(any data, [boolean isUrl='false'])
Experimental!

Parameters:
data - A string that needs to be parsed into an XML DOM Object.
isUrl - Flag that determines whether or not the data argument is a URL as opposed to a string.

isWrapped

public boolean isWrapped(string html)

Parameters:
html - Wraps the internal contents of script tags with a CDATA section. Workaround for JTidy lack.

wrapScriptTagInCDATA

public string wrapScriptTagInCDATA(string html)
Regular Expression util wrapper. Wraps script tag in CDATA section for xml parsing.

Parameters:
html - Wraps the internal contents of script tags with a CDATA section. Workaround for JTidy lack.

MXUnit 2.1.3 (Generated: 09/27/2012)