|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.shared.MobyUnitTest
public class MobyUnitTest
A class representing a moby unit test. In addition, this class has methods to perform the various tests required for unit testing moby services.
Constructor Summary | |
---|---|
MobyUnitTest()
Default Constructor - creates a blank MobyUnitTest object |
Method Summary | |
---|---|
boolean |
compareOutputXML(String testXML)
XML is assumed to be wellformed and valid. |
boolean |
compareXmlWithREGEX(String testXML,
boolean multiline)
|
boolean |
compareXmlWithXpath(String testXML)
|
String |
getExampleInput()
Getter: get the example input that you can use to invoke this service |
String |
getValidOutputXML()
Getter: get the expected XML output for this service (usually by sending it the input from getExampleInput() |
String |
getValidREGEX()
Getter: get the Regular Expression for this unit test |
String |
getValidXPath()
Getter: get the xpath expression for this unit test |
String |
getXMLDifferences(String testXML)
|
void |
setExampleInput(String exampleInput)
Setter: set the example input that can be passed to the service to invoke it |
void |
setValidOutputXML(String validOutputXML)
Setter: set the expected XML output for this serivce |
void |
setValidREGEX(String validREGEX)
Setter: set the regular expression for this unit test |
void |
setValidXPath(String validXPath)
Setter: set the xpath expression for this unit test |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MobyUnitTest()
Method Detail |
---|
public String getExampleInput()
public void setExampleInput(String exampleInput)
exampleInput
- a string of XML representing a services example inputpublic String getValidOutputXML()
getExampleInput()
public void setValidOutputXML(String validOutputXML)
validOutputXML
- a string of XML representing a services expected outputpublic String getValidREGEX()
public void setValidREGEX(String validREGEX)
validREGEX
- a regular expression that can be used on a services output
to determine validitypublic String getValidXPath()
public void setValidXPath(String validXPath)
validXPath
- an xpath expression that can be used to drill into a
services outputpublic String toString()
toString
in class Object
public boolean compareOutputXML(String testXML) throws MobyException
testXML
- the XML that you would like to compare to XML obtained
from getValidOutputXML()
MobyException
- if there is a problem reading/parsing the testXMLpublic boolean compareXmlWithXpath(String testXML) throws MobyException
testXML
- the XML that you would like to test the XPATH, from
getValidXPath()
, expression against
MobyException
- if there is a problem compiling the XPATH expression, or
reading/parsing the textXMLpublic boolean compareXmlWithREGEX(String testXML, boolean multiline)
testXML
- the XML that you would like to test the REGEX, from
getValidREGEX()
, expression against
public String getXMLDifferences(String testXML)
testXML
- the XML that you would like to 'diff' to XML obtained from
getValidOutputXML()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |