org.apache.commons.jelly.tags.xmlunit
Class AssertDocumentsEqualTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.xpath.XPathTagSupport
          extended byorg.apache.commons.jelly.tags.junit.AssertTagSupport
              extended byorg.apache.commons.jelly.tags.xmlunit.XMLUnitTagSupport
                  extended byorg.apache.commons.jelly.tags.xmlunit.AssertDocumentsEqualTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class AssertDocumentsEqualTag
extends XMLUnitTagSupport

Compares two XML documents using XMLUnit (http://xmlunit.sourceforge.net/). If they are different an exception will be thrown.


Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
AssertDocumentsEqualTag()
           
 
Method Summary
protected  org.dom4j.io.SAXReader createSAXReader()
          Factory method to create a new SAXReader
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 void setActual(java.lang.Object actual)
          Sets the actual XML document which is either a Document, String (of an URI), URI, Reader, or InputStream.
 void setExpected(java.lang.Object expected)
          Sets the expected XML document which is either a Document, String (of an URI), URI, Reader, or InputStream.
 void setIgnoreWhitespace(boolean ignoreWhitespace)
          Controls whether whitespace differences should be interpreted as differences or not.
 
Methods inherited from class org.apache.commons.jelly.tags.xmlunit.XMLUnitTagSupport
getSAXReader, parse, parseBody, setSAXReader
 
Methods inherited from class org.apache.commons.jelly.tags.junit.AssertTagSupport
fail, fail, failNotEquals
 
Methods inherited from class org.apache.commons.jelly.xpath.XPathTagSupport
getXPathContext
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertDocumentsEqualTag

public AssertDocumentsEqualTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.JellyTagException

setActual

public void setActual(java.lang.Object actual)
Sets the actual XML document which is either a Document, String (of an URI), URI, Reader, or InputStream.


setExpected

public void setExpected(java.lang.Object expected)
Sets the expected XML document which is either a Document, String (of an URI), URI, Reader, or InputStream.


setIgnoreWhitespace

public void setIgnoreWhitespace(boolean ignoreWhitespace)
Controls whether whitespace differences should be interpreted as differences or not. The default is false. Note that the use of the trim attribute is crucial here.


createSAXReader

protected org.dom4j.io.SAXReader createSAXReader()
Description copied from class: XMLUnitTagSupport
Factory method to create a new SAXReader

Specified by:
createSAXReader in class XMLUnitTagSupport


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.