| test.util.MakumbaJspTestCase
All known Subclasses: test.tags.FormsHQLTest, test.newtags.ListHQLTest, test.tags.MakumbaCommonTagsTest, test.newtags.ListOQLTest, test.tags.ListHQLTest, test.newtags.FormsHQLTest, test.newtags.FormsOQLTest, test.tags.ListOQLTest, test.tags.FormsOQLTest,
MakumbaJspTestCase | public class MakumbaJspTestCase extends JspTestCase (Code) | | Utility class which enables it to quickly write tests based on the execution of a JSP. Since we know the expected
result, we can fetch this result and store it into a file, and then compare the next executions of the test against
this file.
author: Manuel Gay version: $Id: MakumbaJSPTest.java,v 1.1 25.09.2007 16:08:26 Manuel Exp $ |
Method Summary | |
protected boolean | compareTest(String result) Compares a test output to its stored (expected) result. | protected void | fetchValidTestResult(String output, boolean record) Method that helps to fetch the result of a test, on the first run. |
compareTest | protected boolean compareTest(String result) throws Exception(Code) | | Compares a test output to its stored (expected) result. The method detects automatically the name of the test
based on the invoking method, so all there's to do is to pass it the new result. TODO this should be much more
verbose
Parameters: result - the new result, from the currently running test true if this worked out, false otherwise. throws: FileNotFoundException - in case the comparison basis file is not found, this indicates it |
fetchValidTestResult | protected void fetchValidTestResult(String output, boolean record)(Code) | | Method that helps to fetch the result of a test, on the first run. Just pass it the expected result, it will
store it automatically. Don't forget to remove it after the first time!
Parameters: output - the result (HTML code) of the page that was ran correctly. Parameters: record - TODO |
|
|