|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport net.sf.jameleon.LocationAwareTagSupport net.sf.jameleon.JameleonTagSupport net.sf.jameleon.function.FunctionTag
public abstract class FunctionTag
Represents an abstract function point that does a lot behind the scenes for the function point developer. The following instance variables are described:
The steps to creating an abstract function tag for a plugin are as follows:
store(java.lang.String,int)
methodsetupEnvironment()
, being sure to call super first. The new behavior should
be to get the corresponding SessionTag
for the plug-in if a handle on the application
is kept there. Use the Jelly-provided findAncestorWithClass(class) method to get a handle on the parent
SessionTag. The abstract FunctionTag implementation should set the handle on the application being tested to
a local instance variable for easy manipulation for FunctionTag extenders. If use of the plug-in FunctionTag requires
a handle on the application, then it is good practice to throw a JameleonScriptException if the an ancestor of the
plug-in SessionTag isn't found.To implement a FunctionTag from an existing plugin, the following methods must be implemented:
The following methods help define the behaviour of the function point and should be implemented not at the plugin level, but at the customization layer the user will do:
Field Summary | |
---|---|
protected AbstractDataDrivableTag |
addt
|
protected boolean |
breakPoint
Tells the GUI to stop at this functional point |
protected boolean |
expectException
Specifies an exception is expected. |
protected boolean |
expectFailure
Specifies a failure is expected. |
protected FunctionResult |
fResults
The Results for this function |
protected long |
functionDelay
The delay time to use at the end of each functional point |
protected String |
functionId
The id of this function. |
protected File |
lastFileWritten
Deprecated. use getFunctionResults().setErrorFile() instead. |
protected static org.apache.log4j.Logger |
log
|
protected static long |
NO_DELAY
|
protected ArrayList |
params
A list of parameters passed to this functional point via the <param> tag. |
protected boolean |
postcondition
Specifies this is a postcondition and will therefore get executed even if a previous functional point or session tag failed. |
protected boolean |
precondition
Specifies this is a precondition |
protected SessionTag |
st
The parent session tag of this functional point |
protected StateStorer |
state
Stores the state of the application. |
protected TestCaseTag |
tct
The parent test case of this functional point |
protected ParamTypeValidatable |
vpt
|
Fields inherited from class net.sf.jameleon.JameleonTagSupport |
---|
attributes, broker, contextVars, fp, unsupportedAttributes |
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
columnNumber, elementTagName, lineNumber, scriptFileName |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
FunctionTag()
|
Method Summary | |
---|---|
void |
addParam(Object param)
Adds a ParamTag to the list of parameters |
void |
addRequiredAttribute(String attribute)
Adds a required attribute to the macro tag defined for this function point. |
void |
assertEquals(boolean expected,
boolean actual)
Asserts that two booleans are equal. |
void |
assertEquals(boolean expected,
boolean actual,
int assertLevel)
Asserts that two booleans are equal. |
void |
assertEquals(byte expected,
byte actual)
Asserts that two bytes are equal. |
void |
assertEquals(byte expected,
byte actual,
int assertLevel)
Asserts that two bytes are equal. |
void |
assertEquals(char expected,
char actual)
Asserts that two chars are equal. |
void |
assertEquals(char expected,
char actual,
int assertLevel)
Asserts that two chars are equal. |
void |
assertEquals(double expected,
double actual,
double delta)
Asserts that two doubles are equal concerning a delta. |
void |
assertEquals(double expected,
double actual,
double delta,
int assertLevel)
Asserts that two doubles are equal concerning a delta. |
void |
assertEquals(float expected,
float actual,
float delta)
Asserts that two floats are equal concerning a delta. |
void |
assertEquals(float expected,
float actual,
float delta,
int assertLevel)
Asserts that two floats are equal concerning a delta. |
void |
assertEquals(int expected,
int actual)
Asserts that two ints are equal. |
void |
assertEquals(int expected,
int actual,
int assertLevel)
Asserts that two ints are equal. |
void |
assertEquals(long expected,
long actual)
Asserts that two longs are equal. |
void |
assertEquals(long expected,
long actual,
int assertLevel)
Asserts that two longs are equal. |
void |
assertEquals(Object expected,
Object actual)
Asserts that two objects are equal. |
void |
assertEquals(Object expected,
Object actual,
int assertLevel)
Asserts that two objects are equal. |
void |
assertEquals(short expected,
short actual)
Asserts that two shorts are equal. |
void |
assertEquals(short expected,
short actual,
int assertLevel)
Asserts that two shorts are equal. |
void |
assertEquals(String message,
boolean expected,
boolean actual)
Asserts that two booleans are equal. |
void |
assertEquals(String message,
boolean expected,
boolean actual,
int assertLevel)
Asserts that two booleans are equal. |
void |
assertEquals(String message,
byte expected,
byte actual)
Asserts that two bytes are equal. |
void |
assertEquals(String message,
byte expected,
byte actual,
int assertLevel)
Asserts that two bytes are equal. |
void |
assertEquals(String message,
char expected,
char actual)
Asserts that two chars are equal. |
void |
assertEquals(String message,
char expected,
char actual,
int assertLevel)
Asserts that two chars are equal. |
void |
assertEquals(String message,
double expected,
double actual,
double delta)
Asserts that two doubles are equal concerning a delta. |
void |
assertEquals(String message,
double expected,
double actual,
double delta,
int assertLevel)
Asserts that two doubles are equal concerning a delta. |
void |
assertEquals(String message,
float expected,
float actual,
float delta)
Asserts that two floats are equal concerning a delta. |
void |
assertEquals(String message,
float expected,
float actual,
float delta,
int assertLevel)
Asserts that two floats are equal concerning a delta. |
void |
assertEquals(String message,
int expected,
int actual)
Asserts that two ints are equal. |
void |
assertEquals(String message,
int expected,
int actual,
int assertLevel)
Asserts that two ints are equal. |
void |
assertEquals(String message,
long expected,
long actual)
Asserts that two longs are equal. |
void |
assertEquals(String message,
long expected,
long actual,
int assertLevel)
Asserts that two longs are equal. |
void |
assertEquals(String message,
Object expected,
Object actual)
Asserts that two objects are equal. |
void |
assertEquals(String message,
Object expected,
Object actual,
int assertLevel)
Asserts that two objects are equal. |
void |
assertEquals(String message,
short expected,
short actual)
Asserts that two shorts are equal. |
void |
assertEquals(String message,
short expected,
short actual,
int assertLevel)
Asserts that two shorts are equal. |
void |
assertEquals(String expected,
String actual)
Asserts that two Strings are equal. |
void |
assertEquals(String expected,
String actual,
int assertLevel)
Asserts that two Strings are equal. |
void |
assertEquals(String message,
String expected,
String actual)
Asserts that two Strings are equal. |
void |
assertEquals(String message,
String expected,
String actual,
int assertLevel)
Asserts that two Strings are equal. |
void |
assertFalse(boolean condition)
Asserts that a condition is false. |
void |
assertFalse(boolean condition,
int assertLevel)
Asserts that a condition is false. |
void |
assertFalse(String message,
boolean condition)
Asserts that a condition is false. |
void |
assertFalse(String message,
boolean condition,
int assertLevel)
Asserts that a condition is false. |
protected void |
assertMethod(Runnable r)
Deprecated. This method will be removed in the next major release. |
protected void |
assertMethodWithLevel(Runnable r,
int assertLevel)
Runs the run method of a Runnable and records the results appropriately. |
void |
assertNotNull(Object object)
Asserts that an object isn't null. |
void |
assertNotNull(Object object,
int assertLevel)
Asserts that an object isn't null. |
void |
assertNotNull(String message,
Object object)
Asserts that an object isn't null. |
void |
assertNotNull(String message,
Object object,
int assertLevel)
Asserts that an object isn't null. |
void |
assertNotSame(Object expected,
Object actual)
Asserts that two objects refer to the same object. |
void |
assertNotSame(Object expected,
Object actual,
int assertLevel)
Asserts that two objects refer to the same object. |
void |
assertNotSame(String message,
Object expected,
Object actual)
Asserts that two objects refer to the same object. |
void |
assertNotSame(String message,
Object expected,
Object actual,
int assertLevel)
Asserts that two objects refer to the same object. |
void |
assertNull(Object object)
Asserts that an object is null. |
void |
assertNull(Object object,
int assertLevel)
Asserts that an object is null. |
void |
assertNull(String message,
Object object)
Asserts that an object is null. |
void |
assertNull(String message,
Object object,
int assertLevel)
Asserts that an object is null. |
void |
assertRegexMatches(String text,
String regex)
Asserts that given regex matches the provided text |
void |
assertRegexMatches(String text,
String regex,
int assertLevel)
Asserts that given regex matches the provided text |
void |
assertRegexMatches(String message,
String text,
String regex)
Asserts that given regex matches the provided text |
void |
assertRegexMatches(String message,
String text,
String regex,
int assertLevel)
Asserts that given regex matches the provided text |
void |
assertSame(Object expected,
Object actual)
Asserts that two objects refer to the same object. |
void |
assertSame(Object expected,
Object actual,
int assertLevel)
Asserts that two objects refer to the same object. |
void |
assertSame(String message,
Object expected,
Object actual)
Asserts that two objects refer to the same object. |
void |
assertSame(String message,
Object expected,
Object actual,
int assertLevel)
Asserts that two objects refer to the same object. |
void |
assertTextContains(String text,
String textContained)
Asserts that two objects are equal. |
void |
assertTextContains(String text,
String textContained,
int assertLevel)
Asserts that two objects are equal. |
void |
assertTextContains(String message,
String text,
String textContained)
Asserts that two objects are equal. |
void |
assertTextContains(String message,
String text,
String textContained,
int assertLevel)
Asserts text is contained into some given text. |
void |
assertTextEndsWith(String text,
String endingText)
Asserts that the given endingText is at the end of the given text.. |
void |
assertTextEndsWith(String text,
String endingText,
int assertLevel)
Asserts that the given endingText is at the end of the given text.. |
void |
assertTextEndsWith(String message,
String text,
String endingText)
Asserts that the given endingText is at the end of the given text.. |
void |
assertTextEndsWith(String message,
String text,
String endingText,
int assertLevel)
Asserts text is contained into some given text. |
void |
assertTextStartsWith(String text,
String startingText)
Asserts that the given startingText begins the given text.. |
void |
assertTextStartsWith(String text,
String startingText,
int assertLevel)
Asserts that the given startingText begins the given text.. |
void |
assertTextStartsWith(String message,
String text,
String startingText)
Asserts that the given startingText begins the given text.. |
void |
assertTextStartsWith(String message,
String text,
String startingText,
int assertLevel)
Asserts that the given startingText begins the given text.. |
void |
assertTrue(boolean condition)
Asserts that a condition is true. |
void |
assertTrue(boolean condition,
int assertLevel)
Asserts that a condition is true. |
void |
assertTrue(String message,
boolean condition)
Asserts that a condition is true. |
void |
assertTrue(String message,
boolean condition,
int assertLevel)
Asserts that a condition is true. |
protected void |
checkParamTypes()
|
protected void |
cleanUp()
If this method is overridden, it is highly suggested that the super method be called as well. |
protected void |
cleanUpEnvironment()
|
void |
delay()
|
void |
delay(long delayTime)
|
void |
doTag(XMLOutput out)
Simply calls setupEnvironment() , validate() , setup() and testBlock(XMLOutput out) . |
void |
fail()
Fails by throwing an AssertionFailedError. |
void |
fail(int assertLevel)
Fails by throwing an AssertionFailedError with a message |
void |
fail(String message)
Fails by throwing an AssertionFailedError with a message |
void |
fail(String message,
int assertLevel)
Fails by throwing an AssertionFailedError with a message |
String |
getFunctionId()
Gets the id of the function being tested. |
FunctionResult |
getFunctionResults()
|
String |
getMatchingRegexText(String text,
String regex,
int matchingGroup)
Gets the matching text found in the given string. |
Object |
getParam(int index)
Gets the nth ParamTag. |
int |
getParamLength()
Gets the number of ParamTags under this tag. |
List |
getParams()
Gets the list of ParamTags under this tag. |
protected void |
getParentTags()
|
SessionTag |
getSessionTag()
|
String |
getStoreToFileName(int event)
Gets the filename to store the state of the application to. |
String |
getStringOrDefault(String value,
String defaultValue)
Gets a String by its default value if an actual value isn't found. |
TestCaseTag |
getTestCaseTag()
Gets the parent test case tag |
Object |
getVariable(String key)
Gets the variable, key from the test case context. |
protected boolean |
getVariableAsBoolean(String key)
|
protected List |
getVariableAsList(String key)
Gets a variable from context and casts it to a list. |
protected String |
getVariableAsString(String key)
|
boolean |
isBreakPoint()
Checks whether this tag is a break point. |
protected boolean |
isContextVariableNull(String key)
Checks to see if the variable, key , is null or hasn't been set. |
void |
pluginTearDown()
Called when the function is done being executed. |
protected void |
recordFunctionResult(long startTime)
Adds the result for this test step into the session's results and logs this information to the logger. |
boolean |
regexMatches(String text,
String regex)
Validates that the provided regex matches the provided text |
protected void |
removeFunctionResult()
|
void |
removeVariable(String key)
Removes the variable, key from the test case context. |
void |
setDefaultVariableValue(String attributeName,
Object attributeValue)
Sets the variable to a default value in the context. |
void |
setDefaultVariableValue(String attributeName,
String attributeValue)
Sets the variable to a default value in the context. |
void |
setExpectException(boolean expectException)
Sets the value for expectException. |
void |
setExpectFailure(boolean expectFailure)
Sets the value for expectFailure. |
void |
setFunctionDelay(long functionDelay)
Sets the delay time to occur at the end of this functional point. |
void |
setFunctionId(String functionId)
Sets the id of the function being tested. |
void |
setup()
Does setup for plugin-required intialization. |
protected void |
setupEnvironment()
This method is called before anything else is called. |
protected void |
setUpFunctionResults()
|
void |
setVariable(String key,
Object value)
Sets the variable, key to the value, value
This is simply a wrapper class for Jelly's own context.setVariable(); |
void |
store(String filename,
int event)
Stores the current state of the object to a given File . |
void |
tearDown()
Called when the function is done being executed. |
void |
testBlock()
Contains the actual testing of the function point. |
protected void |
traceMsg(String msg)
|
protected void |
validate()
This method is called before the testBlock method is called. |
Methods inherited from class net.sf.jameleon.JameleonTagSupport |
---|
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught |
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.jelly.Tag |
---|
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent |
Field Detail |
---|
protected FunctionResult fResults
protected String functionId
protected boolean breakPoint
protected boolean precondition
protected boolean postcondition
protected boolean expectFailure
protected boolean expectException
protected File lastFileWritten
protected ArrayList params
protected SessionTag st
protected TestCaseTag tct
protected StateStorer state
protected static org.apache.log4j.Logger log
protected ParamTypeValidatable vpt
protected static final long NO_DELAY
protected long functionDelay
protected AbstractDataDrivableTag addt
Constructor Detail |
---|
public FunctionTag()
Method Detail |
---|
public String getFunctionId()
public void setFunctionId(String functionId)
functionId
- - the id of the function being testedpublic void setExpectFailure(boolean expectFailure)
expectFailure
- - set to true to expect a failure. To invoke this functionality must be 'yes' or 'true'.public void setExpectException(boolean expectException)
expectException
- - a value of "yes" or "true" indicates the function tag should only pass if there is an exception.public boolean isBreakPoint()
isBreakPoint
in interface BreakPoint
public void setFunctionDelay(long functionDelay)
functionDelay
- - the time in millis.public void setup()
public void tearDown()
public void pluginTearDown()
public void testBlock() throws Exception
Exception
- when something goes wrongpublic void doTag(XMLOutput out) throws MissingAttributeException
setupEnvironment()
, validate()
, setup()
and testBlock(XMLOutput out)
.
If this method is overridden, you will need to call super.doTag() or else none of the logging or error reporting will work!
doTag
in interface Tag
MissingAttributeException
protected void cleanUp()
protected void cleanUpEnvironment()
protected void traceMsg(String msg)
public void addRequiredAttribute(String attribute)
attribute
- - The name of the attribute to add to the required list.public void setDefaultVariableValue(String attributeName, String attributeValue)
attributeName
- - the name attribute to setattributeValue
- - the value of the attribute to set.net.sf.jameleon.TestCaseTag
public void setDefaultVariableValue(String attributeName, Object attributeValue)
attributeName
- - the name attribute to setattributeValue
- - the value of the attribute to set.net.sf.jameleon.TestCaseTag
public void setVariable(String key, Object value)
key
to the value, value
This is simply a wrapper class for Jelly's own context.setVariable();
key
- - the name attribute to setvalue
- - the value of the attribute to set.public Object getVariable(String key)
key
from the test case context.
This is simply a wrapper class for Jelly's own context.getVariable();
key
- - the name attribute to set
key
public void removeVariable(String key)
key
from the test case context.
This is simply a wrapper class for Jelly's own context.removeVariable();
key
- - the name attribute to setprotected String getVariableAsString(String key)
key
- The variable name
key
from the context as a Stringprotected boolean getVariableAsBoolean(String key)
key
- The variable name
key
from the context as a (primitive) booleanprotected List getVariableAsList(String key)
key
- The variable name
key
from the context as a List even if the value is null.protected boolean isContextVariableNull(String key)
key
, is null or hasn't been set.
key
- - The name of the variable to be checked for a null value. This variable must be a String.
protected void validate() throws MissingAttributeException
MissingAttributeException
- - When a required attribute is not set.protected void checkParamTypes()
protected void setupEnvironment()
protected void getParentTags()
protected void setUpFunctionResults()
protected void removeFunctionResult()
protected void recordFunctionResult(long startTime)
startTime
- - The time this test step started execution.public FunctionResult getFunctionResults()
public String getMatchingRegexText(String text, String regex, int matchingGroup)
text
- - The text to match againstregex
- - The regex pattern to match. This regex pattern must
have a single grouping representing the desired text.matchingGroup
- - The group position to match against.
public boolean regexMatches(String text, String regex)
text
- - The text to match againstregex
- - The regex pattern to match
public String getStringOrDefault(String value, String defaultValue)
value
- - the value to returndefaultValue
- - the value to return if the value
parameter is null
public TestCaseTag getTestCaseTag()
public void store(String filename, int event) throws IOException
Stores the current state of the object to a given File
. The default
implementation of this method does nothing. Override this method to implement
plug-in specific behavior. Some examples might be:
A listener is already registered for each function tag. All that is required is implementing this method.
store
in interface Storable
filename
- the name of the if the file to store the contents to.event
- The event
that occured (error, state change ...).
IOException
- If the state of the object could not be stored in File f
.public SessionTag getSessionTag()
public String getStoreToFileName(int event)
getStoreToFileName
in interface Storable
event
- - the StateStorer Event
protected void assertMethod(Runnable r)
r
- - The block of code you want executed ( defined in the run() method ).protected void assertMethodWithLevel(Runnable r, int assertLevel)
r
- - The block of code you want executed ( defined in the run() method ).assertLevel
- - The assert level of when to run the methodpublic void fail()
public void fail(String message)
message
message
- - The message to display on failure.public void fail(int assertLevel)
message
assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void fail(String message, int assertLevel)
message
message
- - The message to display on failure.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTrue(boolean condition)
condition
- - The boolean condition to test.public void assertTrue(String message, boolean condition)
message
- - The message to print out if the assert failscondition
- - The boolean condition to test.public void assertTrue(boolean condition, int assertLevel)
condition
- - The boolean condition to test.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTrue(String message, boolean condition, int assertLevel)
message
- - The message to print out if the assert failscondition
- - The boolean condition to test.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertFalse(boolean condition)
condition
- - The boolean condition to test.public void assertFalse(String message, boolean condition)
message
- - The message to print out if the assert failscondition
- - The boolean condition to test.public void assertFalse(boolean condition, int assertLevel)
condition
- - The boolean condition to test.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertFalse(String message, boolean condition, int assertLevel)
message
- - The message to print out if the assert failscondition
- - The boolean condition to test.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextContains(String text, String textContained)
text
- - The text to be comparedtextContained
- - the text to be containedpublic void assertTextContains(String message, String text, String textContained)
message
- - The message to print out if the assert failstext
- - The text to be comparedtextContained
- - the text to be containedpublic void assertTextContains(String text, String textContained, int assertLevel)
text
- - The text to be comparedtextContained
- - the text to be containedassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextContains(String message, String text, String textContained, int assertLevel)
message
- - The message to print out if the assert failstext
- - The text to be comparedtextContained
- - the text to be containedassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextStartsWith(String text, String startingText)
text
- - The text to be comparedstartingText
- - the text that must be at the beginning.public void assertTextStartsWith(String message, String text, String startingText)
message
- - The message to print out if the assert failstext
- - The text to be comparedstartingText
- - the text that must be at the beginning.public void assertTextStartsWith(String text, String startingText, int assertLevel)
text
- - The text to be comparedstartingText
- - the text that must be at the beginning.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextStartsWith(String message, String text, String startingText, int assertLevel)
message
- - The message to print out if the assert failstext
- - The text to be comparedstartingText
- - the text that must be at the beginning.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextEndsWith(String text, String endingText)
text
- - The text to be comparedendingText
- - the text that must be at the end.public void assertTextEndsWith(String message, String text, String endingText)
message
- - The message to print out if the assert failstext
- - The text to be comparedendingText
- - the text that must be at the end.public void assertTextEndsWith(String text, String endingText, int assertLevel)
text
- - The text to be comparedendingText
- - the text that must be at the end.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertTextEndsWith(String message, String text, String endingText, int assertLevel)
message
- - The message to print out if the assert failstext
- - The text to be comparedendingText
- - the text that must be at the end.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(Object expected, Object actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, Object expected, Object actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(Object expected, Object actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, Object expected, Object actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String expected, String actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, String expected, String actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String expected, String actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, String expected, String actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(double expected, double actual, double delta)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.public void assertEquals(String message, double expected, double actual, double delta)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.public void assertEquals(double expected, double actual, double delta, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, double expected, double actual, double delta, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(float expected, float actual, float delta)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.public void assertEquals(String message, float expected, float actual, float delta)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.public void assertEquals(float expected, float actual, float delta, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, float expected, float actual, float delta, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.delta
- - The amount the expected and actual can be different from each other.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(long expected, long actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, long expected, long actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(long expected, long actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, long expected, long actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(boolean expected, boolean actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, boolean expected, boolean actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(boolean expected, boolean actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, boolean expected, boolean actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(byte expected, byte actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, byte expected, byte actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(byte expected, byte actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, byte expected, byte actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(char expected, char actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, char expected, char actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(char expected, char actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, char expected, char actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(short expected, short actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, short expected, short actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(short expected, short actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, short expected, short actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(int expected, int actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(String message, int expected, int actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertEquals(int expected, int actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertEquals(String message, int expected, int actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertNotNull(Object object)
object
- - The object to test for nullpublic void assertNotNull(String message, Object object)
message
- - The message to print out if the assert failsobject
- - The object to test for nullpublic void assertNotNull(Object object, int assertLevel)
object
- - The object to test for nullassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertNotNull(String message, Object object, int assertLevel)
message
- - The message to print out if the assert failsobject
- - The object to test for nullassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertNull(Object object)
object
- - The object to test for nullpublic void assertNull(String message, Object object)
message
- - The message to print out if the assert failsobject
- - The object to test for nullpublic void assertNull(Object object, int assertLevel)
object
- - The object to test for nullassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertNull(String message, Object object, int assertLevel)
message
- - The message to print out if the assert failsobject
- - The object to test for nullassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertRegexMatches(String text, String regex)
text
- - The text to match the regex againstregex
- - The regex to match.public void assertRegexMatches(String message, String text, String regex)
message
- - The message to print out if the assert failstext
- - The text to match the regex againstregex
- - The regex to match.public void assertRegexMatches(String text, String regex, int assertLevel)
text
- - The text to match the regex againstregex
- - The regex to match.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertRegexMatches(String message, String text, String regex, int assertLevel)
message
- - The message to print out if the assert failstext
- - The text to match the regex againstregex
- - The regex to match.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSame(Object expected, Object actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertSame(String message, Object expected, Object actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertSame(Object expected, Object actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertSame(String message, Object expected, Object actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertNotSame(Object expected, Object actual)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertNotSame(String message, Object expected, Object actual)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.public void assertNotSame(Object expected, Object actual, int assertLevel)
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void assertNotSame(String message, Object expected, Object actual, int assertLevel)
message
- - The message to print out if the assert failsexpected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
public void addParam(Object param)
param
- - the ParamTag to addpublic Object getParam(int index)
index
- - the index location of the desired ParamTag.
public List getParams()
public int getParamLength()
public void delay()
public void delay(long delayTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |