public class GoldenFileValidator extends BaseValidator implements Validator
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
_goldFile |
protected boolean |
_ignoreWhitespace |
protected java.lang.StringBuffer |
_matchLog |
protected static java.lang.String |
TRUE_MESSAGE |
_label, _log
Constructor and Description |
---|
GoldenFileValidator(java.io.File goldenFile) |
GoldenFileValidator(java.lang.String label,
java.io.File goldenFile) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
compare(byte[] array1,
byte[] array2) |
protected boolean |
compareWeak(java.lang.String str1,
java.lang.String str2) |
protected void |
log(java.lang.String message) |
void |
setIgnoreWhitespace(boolean ignoreWhitespace) |
void |
validate(Response response)
Validate a response
|
fail, getLabel, setLabel
protected java.io.File _goldFile
protected boolean _ignoreWhitespace
protected static java.lang.String TRUE_MESSAGE
protected java.lang.StringBuffer _matchLog
public GoldenFileValidator(java.io.File goldenFile)
public GoldenFileValidator(java.lang.String label, java.io.File goldenFile)
public void setIgnoreWhitespace(boolean ignoreWhitespace)
public void validate(Response response) throws ValidationException
BaseValidator
validate
in interface Validator
validate
in class BaseValidator
response
- the response to validateValidationException
- if the Response fails to be validprotected boolean compare(byte[] array1, byte[] array2)
protected boolean compareWeak(java.lang.String str1, java.lang.String str2)
protected void log(java.lang.String message)
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.