public class VerifierToXMLFile extends VerifierToFile
<Response>
<StatusCode>200</StatusCode>
<Headers>{Date=Tue, 13 Dec 2016 03:29:27 GMT, Content-Length=4574, Connection=keep-alive, Content-Type=application/xml}</Headers>
<EntityBody><![CDATA[<?xml version="1.0"?><CUSTOMERList xmlns:xlink="http://www.w3.org/1999/xlink">
<CUSTOMER xlink:href="http://www.thomas-bayer.com/sqlrest/CUSTOMER/0/">0</CUSTOMER>
<CUSTOMER xlink:href="http://www.thomas-bayer.com/sqlrest/CUSTOMER/49/">49</CUSTOMER>
</CUSTOMERList>]]></EntityBody>
<Request>
<Method>GET</Method>
<Headers>
Content-Type:application/octet-stream, Accept:application/octet-stream
</Headers>
</Request>
</Response>
This class uses the Java SAX XML Reader to do the work.| Modifier and Type | Class and Description |
|---|---|
protected class |
VerifierToXMLFile.VerificationHandler |
| Modifier and Type | Field and Description |
|---|---|
protected org.xml.sax.InputSource |
inputSource |
protected javax.xml.parsers.SAXParser |
saxParser |
actualContents, checkedFields, expectedContents, filename, ignoredFields, matchAllFields, matched, nonMatchedMessages, reader, valueCaseSensitive, valueContainsruntimeBOOL_MATCH_ALL_FIELDS, BOOL_VALUE_CASESENSITIVE, BOOL_VALUE_CONTAINS| Constructor and Description |
|---|
VerifierToXMLFile(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) |
static void |
main(java.lang.String[] args) |
afterCheck, check, equals, getType, isIgnoredFiled, match, verifyvalidateprotected javax.xml.parsers.SAXParser saxParser
protected org.xml.sax.InputSource inputSource
public VerifierToXMLFile(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)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © SAS Institute. All Rights Reserved.