avignon.handlers
Class WebPageAsserter

java.lang.Object
  extended byjunit.framework.Assert
      extended byavignon.handlers.WebPageAsserter
Direct Known Subclasses:
ClickHandlerLogic, SubmitPageHandler

public abstract class WebPageAsserter
extends junit.framework.Assert

Asserts that an expected web page matches the actual web page.


Constructor Summary
WebPageAsserter()
           
 
Method Summary
protected  void assertPageAsExpected(java.lang.String actualPage)
          Compares the text of the actual page to the expected file after any transforms have been performed.
protected  java.lang.String getPageDescription()
          Gets the relative path of the expected XML file.
protected  void setBaseDirectory(java.lang.String value)
          Sets the directory in which to start looking for expected XML and XSL files.
protected  void setNoTransform(java.lang.String value)
          Determines whether or not the expected file will undergo any transformations or not.
protected  void setPageDescription(java.lang.String value)
          Sets the path, relative to the base directory, to the expected XML file.
protected  void setPreTranslation(java.lang.String value)
          Sets the path, relative to the base directory, of the XSL file that will transform the expected XML file.
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebPageAsserter

public WebPageAsserter()
Method Detail

setNoTransform

protected void setNoTransform(java.lang.String value)
Determines whether or not the expected file will undergo any transformations or not.

Parameters:
value - If this value equals (ignoring case) the word "true", the expected file will not be transformed.

setBaseDirectory

protected void setBaseDirectory(java.lang.String value)
Sets the directory in which to start looking for expected XML and XSL files.

Parameters:
value - Base directory to use for XML and XSL files.

setPageDescription

protected void setPageDescription(java.lang.String value)
Sets the path, relative to the base directory, to the expected XML file.

Parameters:
value - The path to the XML file descibing the expected page.

getPageDescription

protected java.lang.String getPageDescription()
Gets the relative path of the expected XML file.

Returns:
The path, relative to the base directory, of the XML description of the expected page.

setPreTranslation

protected void setPreTranslation(java.lang.String value)
Sets the path, relative to the base directory, of the XSL file that will transform the expected XML file. If this value is null there will be no pre-transform step for the expected XML, but it may still be transformed by the global page transformer.

Parameters:
value - Path to the XSL file that will transform the XML expected page description.

assertPageAsExpected

protected void assertPageAsExpected(java.lang.String actualPage)
Compares the text of the actual page to the expected file after any transforms have been performed.

Parameters:
actualPage - Text of the actual page.

SourceForge.net Logo