public class VerifierToJSONFile extends VerifierToFile
{ "Response": { "StatusCode": "200", "Headers" : "{Date=Tue, 13 Dec 2016 03:32:13 GMT, Content-Length=4574, Content-Type=application/xml}", "EntityBody" : "<?xml version=\"1.0\"?><CUSTOMERList xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <CUSTOMER xlink:href=\"http://www.thomas-bayer.com/sqlrest/CUSTOMER/0/\">0</CUSTOMER> \n</CUSTOMERList>", "Request": { "Method": "GET", "Headers": "{Date=Tue, 06 Dec 2016 03:08:12 GMT, Content-Length=4574}" } } }This class uses the Java SAX XML Reader to do the work.
actualContents, checkedFields, defaultElementValues, expectedContents, filename, ignoredFields, matchAllFields, matched, nonMatchedMessages, reader, valueCaseSensitive, valueContains
runtime
BOOL_MATCH_ALL_FIELDS, BOOL_VALUE_CASESENSITIVE, BOOL_VALUE_CONTAINS
Constructor and Description |
---|
VerifierToJSONFile(RuntimeDataInterface runtime,
java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
void |
beforeCheck(Persistable persistable,
boolean... conditions)
Get some variables prepared for verification.
Parse the optional parameters It is expected that subclass should override this method to provide values to VerifierToFile.expectedContents and VerifierToFile.actualContents , such as: |
afterCheck, check, equals, getType, isIgnoredFiled, match, verify
validate
public VerifierToJSONFile(RuntimeDataInterface runtime, java.lang.String filename)
runtime
- filename
- public void beforeCheck(Persistable persistable, boolean... conditions) throws SAFSException, java.io.IOException
VerifierToFile
VerifierToFile.expectedContents
and VerifierToFile.actualContents
, such as:
public void beforeCheck(Persistable persistable, boolean... conditions) throws SAFSException, IOException{
super.beforeCheck(persistable, conditions);
//Fill in Map 'actualContents'
//Fill in Map 'expectedContents'
}
beforeCheck
in class VerifierToFile
SAFSException
java.io.IOException
Copyright © SAS Institute. All Rights Reserved.