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.| Modifier and Type | Field and Description |
|---|---|
(package private) org.json.JSONObject |
jsonObject |
actualContents, checkedFields, expectedContents, filename, ignoredFields, matchAllFields, matched, nonMatchedMessages, reader, valueCaseSensitive, valueContainsruntimeBOOL_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: |
(package private) void |
debug(java.lang.String msg) |
afterCheck, check, equals, getType, isIgnoredFiled, match, verifyvalidatepublic VerifierToJSONFile(RuntimeDataInterface runtime, java.lang.String filename)
runtime - filename - public void beforeCheck(Persistable persistable, boolean... conditions) throws SAFSException, java.io.IOException
VerifierToFileVerifierToFile.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 VerifierToFileSAFSExceptionjava.io.IOExceptionvoid debug(java.lang.String msg)
Copyright © SAS Institute. All Rights Reserved.