public final class DiffUtil extends Object
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 and Description |
|---|
DiffUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
replaceExpectedResultFile(String document,
Class<?> clazz,
String file)
Replace the expected result file with the current output.
|
static boolean |
validatePage(String document,
Class<?> clazz,
String file,
boolean failWithAssert)
Compare the output generated by Wicket ("document") with the a previously generated file
which contains the expected result.
|
public static void replaceExpectedResultFile(String document, Class<?> clazz, String file) throws 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 createdIOExceptionpublic static boolean validatePage(String document, Class<?> clazz, String file, boolean failWithAssert) throws IOException
document - Current outputfile - Expected outputclazz - Used to load the file (relative to clazz package)failWithAssert - IOExceptionCopyright © 2006–2021 Apache Software Foundation. All rights reserved.