|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.tester.DiffUtil
public final class DiffUtil
This is a utility class. It serves two purposes.
First: compare a string output generated by wicket with a file's content (expected result).
Second: Create/replace the expected result file with the new content, if a system property has be made available like -Dwicket.replace.expected.results=true
Constructor Summary | |
---|---|
DiffUtil()
|
Method Summary | |
---|---|
static void |
replaceExpectedResultFile(java.lang.String document,
java.lang.Class<?> clazz,
java.lang.String file)
Replace the expected result file with the current output. |
static boolean |
validatePage(java.lang.String document,
java.lang.Class<?> clazz,
java.lang.String file,
boolean failWithAssert)
Compare the output generated by Wicket ("document") with the a previously generated file which contains the expected result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiffUtil()
Method Detail |
---|
public static final void replaceExpectedResultFile(java.lang.String document, java.lang.Class<?> clazz, java.lang.String file) throws java.io.IOException
document
- How the expected result should look likeclazz
- Used to load the file (relative to clazz package)file
- The name of the expected result file to be created
java.io.IOException
public static final boolean validatePage(java.lang.String document, java.lang.Class<?> clazz, java.lang.String file, boolean failWithAssert) throws java.io.IOException
document
- Current outputfile
- Expected outputclazz
- Used to load the file (relative to clazz package)failWithAssert
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |