|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
removeVariable
public void removeVariable(String key)
- Removes the variable,
key
from the test case context.
This is simply a wrapper class for Jelly's own context.removeVariable();
- Parameters:
key
- - the name attribute to set
getVariableAsString
protected String getVariableAsString(String key)
- Parameters:
key
- The variable name
- Returns:
- a variable with name
key
from the context as a String
getVariableAsBoolean
protected boolean getVariableAsBoolean(String key)
- Parameters:
key
- The variable name
- Returns:
- a variable with name
key
from the context as a (primitive) boolean
getVariableAsList
protected List getVariableAsList(String key)
- Gets a variable from context and casts it to a list. If the value isn't a
List, then it creates a ArrayList and adds the value to it.
- Parameters:
key
- The variable name
- Returns:
- a variable with name
key
from the context as a List even if the value is null.
isContextVariableNull
protected boolean isContextVariableNull(String key)
- Checks to see if the variable,
key
, is null or hasn't been set.
- Parameters:
key
- - The name of the variable to be checked for a null value. This variable must be a String.
- Returns:
- true If the variable is set to null or "" then.
validate
protected void validate()
throws MissingAttributeException
- This method is called before the testBlock method is called.
If you want to override this method, call super first,
followed by the custom validations that need to occur in your TestStep.
- Throws:
MissingAttributeException
- - When a required attribute is not set.
checkParamTypes
protected void checkParamTypes()
setupEnvironment
protected void setupEnvironment()
- This method is called before anything else is called.
getParentTags
protected void getParentTags()
setUpFunctionResults
protected void setUpFunctionResults()
removeFunctionResult
protected void removeFunctionResult()
recordFunctionResult
protected void recordFunctionResult(long startTime)
- Adds the result for this test step into the session's results
and logs this information to the logger.
- Parameters:
startTime
- - The time this test step started execution.
getFunctionResults
public FunctionResult getFunctionResults()
- Returns:
- The test results of this test step
getMatchingRegexText
public String getMatchingRegexText(String text,
String regex,
int matchingGroup)
- Gets the matching text found in the given string.
- Parameters:
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.
- Returns:
- The matching text in the searchString
regexMatches
public boolean regexMatches(String text,
String regex)
- Validates that the provided regex matches the provided text
- Parameters:
text
- - The text to match againstregex
- - The regex pattern to match
- Returns:
- True if the regex matches or false if it doesn't
getStringOrDefault
public String getStringOrDefault(String value,
String defaultValue)
- Gets a String by its default value if an actual value isn't found.
- Parameters:
value
- - the value to returndefaultValue
- - the value to return if the value
parameter is null
- Returns:
- a String by its default value if an actual value isn't found..
getTestCaseTag
public TestCaseTag getTestCaseTag()
- Gets the parent test case tag
- Returns:
- the parent test case tag of this tag.
store
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:
- Saving the HTML from an HTTP plug-in during a state change or error
- Taking a screen shot for a GUI application during a state change event
A listener is already registered for each function tag. All that is required is
implementing this method.
- Specified by:
store
in interface Storable
- Parameters:
filename
- the name of the if the file to store the contents to.event
- The event
that occured (error, state change ...).
- Throws:
IOException
- If the state of the object could not be stored in File f
.
getSessionTag
public SessionTag getSessionTag()
getStoreToFileName
public String getStoreToFileName(int event)
- Gets the filename to store the state of the application to.
The default implementation is to simply use timestamps.
If this is not the desired behavior, override this method.
- Specified by:
getStoreToFileName
in interface Storable
- Parameters:
event
- - the StateStorer Event
- Returns:
- the appropriate filename which starts with ERROR- if the StateStorer Event was an Error
assertMethod
protected void assertMethod(Runnable r)
- Deprecated. This method will be removed in the next major release.
- Runs the run method of a Runnable and records the results appropriately.
- Parameters:
r
- - The block of code you want executed ( defined in the run() method ).
assertMethodWithLevel
protected void assertMethodWithLevel(Runnable r,
int assertLevel)
- Runs the run method of a Runnable and records the results appropriately.
- Parameters:
r
- - The block of code you want executed ( defined in the run() method ).assertLevel
- - The assert level of when to run the method
fail
public void fail()
- Fails by throwing an AssertionFailedError.
fail
public void fail(String message)
- Fails by throwing an AssertionFailedError with a
message
- Parameters:
message
- - The message to display on failure.
fail
public void fail(int assertLevel)
- Fails by throwing an AssertionFailedError with a
message
- Parameters:
assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
fail
public void fail(String message,
int assertLevel)
- Fails by throwing an AssertionFailedError with a
message
- Parameters:
message
- - The message to display on failure.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertTrue
public void assertTrue(boolean condition)
- Asserts that a condition is true.
- Parameters:
condition
- - The boolean condition to test.
assertTrue
public void assertTrue(String message,
boolean condition)
- Asserts that a condition is true.
- Parameters:
message
- - The message to print out if the assert failscondition
- - The boolean condition to test.
assertTrue
public void assertTrue(boolean condition,
int assertLevel)
- Asserts that a condition is true.
- Parameters:
condition
- - The boolean condition to test.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertTrue
public void assertTrue(String message,
boolean condition,
int assertLevel)
- Asserts that a condition is true.
- Parameters:
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
assertFalse
public void assertFalse(boolean condition)
- Asserts that a condition is false.
- Parameters:
condition
- - The boolean condition to test.
assertFalse
public void assertFalse(String message,
boolean condition)
- Asserts that a condition is false.
- Parameters:
message
- - The message to print out if the assert failscondition
- - The boolean condition to test.
assertFalse
public void assertFalse(boolean condition,
int assertLevel)
- Asserts that a condition is false.
- Parameters:
condition
- - The boolean condition to test.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertFalse
public void assertFalse(String message,
boolean condition,
int assertLevel)
- Asserts that a condition is false.
- Parameters:
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
assertTextContains
public void assertTextContains(String text,
String textContained)
- Asserts that two objects are equal.
- Parameters:
text
- - The text to be comparedtextContained
- - the text to be contained
assertTextContains
public void assertTextContains(String message,
String text,
String textContained)
- Asserts that two objects are equal.
- Parameters:
message
- - The message to print out if the assert failstext
- - The text to be comparedtextContained
- - the text to be contained
assertTextContains
public void assertTextContains(String text,
String textContained,
int assertLevel)
- Asserts that two objects are equal.
- Parameters:
text
- - The text to be comparedtextContained
- - the text to be containedassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertTextContains
public void assertTextContains(String message,
String text,
String textContained,
int assertLevel)
- Asserts text is contained into some given text.
- Parameters:
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
assertTextStartsWith
public void assertTextStartsWith(String text,
String startingText)
- Asserts that the given startingText begins the given text..
- Parameters:
text
- - The text to be comparedstartingText
- - the text that must be at the beginning.
assertTextStartsWith
public void assertTextStartsWith(String message,
String text,
String startingText)
- Asserts that the given startingText begins the given text..
- Parameters:
message
- - The message to print out if the assert failstext
- - The text to be comparedstartingText
- - the text that must be at the beginning.
assertTextStartsWith
public void assertTextStartsWith(String text,
String startingText,
int assertLevel)
- Asserts that the given startingText begins the given text..
- Parameters:
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
assertTextStartsWith
public void assertTextStartsWith(String message,
String text,
String startingText,
int assertLevel)
- Asserts that the given startingText begins the given text..
- Parameters:
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
assertTextEndsWith
public void assertTextEndsWith(String text,
String endingText)
- Asserts that the given endingText is at the end of the given text..
- Parameters:
text
- - The text to be comparedendingText
- - the text that must be at the end.
assertTextEndsWith
public void assertTextEndsWith(String message,
String text,
String endingText)
- Asserts that the given endingText is at the end of the given text..
- Parameters:
message
- - The message to print out if the assert failstext
- - The text to be comparedendingText
- - the text that must be at the end.
assertTextEndsWith
public void assertTextEndsWith(String text,
String endingText,
int assertLevel)
- Asserts that the given endingText is at the end of the given text..
- Parameters:
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
assertTextEndsWith
public void assertTextEndsWith(String message,
String text,
String endingText,
int assertLevel)
- Asserts text is contained into some given text.
- Parameters:
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
assertEquals
public void assertEquals(Object expected,
Object actual)
- Asserts that two objects are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
Object expected,
Object actual)
- Asserts that two objects are equal.
- Parameters:
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.
assertEquals
public void assertEquals(Object expected,
Object actual,
int assertLevel)
- Asserts that two objects are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
Object expected,
Object actual,
int assertLevel)
- Asserts that two objects are equal.
- Parameters:
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
assertEquals
public void assertEquals(String expected,
String actual)
- Asserts that two Strings are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
String expected,
String actual)
- Asserts that two Strings are equal.
- Parameters:
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.
assertEquals
public void assertEquals(String expected,
String actual,
int assertLevel)
- Asserts that two Strings are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
String expected,
String actual,
int assertLevel)
- Asserts that two Strings are equal.
- Parameters:
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
assertEquals
public void assertEquals(double expected,
double actual,
double delta)
- Asserts that two doubles are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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.
assertEquals
public void assertEquals(String message,
double expected,
double actual,
double delta)
- Asserts that two doubles are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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.
assertEquals
public void assertEquals(double expected,
double actual,
double delta,
int assertLevel)
- Asserts that two doubles are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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
assertEquals
public void assertEquals(String message,
double expected,
double actual,
double delta,
int assertLevel)
- Asserts that two doubles are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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
assertEquals
public void assertEquals(float expected,
float actual,
float delta)
- Asserts that two floats are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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.
assertEquals
public void assertEquals(String message,
float expected,
float actual,
float delta)
- Asserts that two floats are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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.
assertEquals
public void assertEquals(float expected,
float actual,
float delta,
int assertLevel)
- Asserts that two floats are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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
assertEquals
public void assertEquals(String message,
float expected,
float actual,
float delta,
int assertLevel)
- Asserts that two floats are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
- Parameters:
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
assertEquals
public void assertEquals(long expected,
long actual)
- Asserts that two longs are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
long expected,
long actual)
- Asserts that two longs are equal.
- Parameters:
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.
assertEquals
public void assertEquals(long expected,
long actual,
int assertLevel)
- Asserts that two longs are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
long expected,
long actual,
int assertLevel)
- Asserts that two longs are equal.
- Parameters:
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
assertEquals
public void assertEquals(boolean expected,
boolean actual)
- Asserts that two booleans are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
boolean expected,
boolean actual)
- Asserts that two booleans are equal.
- Parameters:
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.
assertEquals
public void assertEquals(boolean expected,
boolean actual,
int assertLevel)
- Asserts that two booleans are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
boolean expected,
boolean actual,
int assertLevel)
- Asserts that two booleans are equal.
- Parameters:
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
assertEquals
public void assertEquals(byte expected,
byte actual)
- Asserts that two bytes are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
byte expected,
byte actual)
- Asserts that two bytes are equal.
- Parameters:
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.
assertEquals
public void assertEquals(byte expected,
byte actual,
int assertLevel)
- Asserts that two bytes are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
byte expected,
byte actual,
int assertLevel)
- Asserts that two bytes are equal.
- Parameters:
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
assertEquals
public void assertEquals(char expected,
char actual)
- Asserts that two chars are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
char expected,
char actual)
- Asserts that two chars are equal.
- Parameters:
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.
assertEquals
public void assertEquals(char expected,
char actual,
int assertLevel)
- Asserts that two chars are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
char expected,
char actual,
int assertLevel)
- Asserts that two chars are equal.
- Parameters:
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
assertEquals
public void assertEquals(short expected,
short actual)
- Asserts that two shorts are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
short expected,
short actual)
- Asserts that two shorts are equal.
- Parameters:
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.
assertEquals
public void assertEquals(short expected,
short actual,
int assertLevel)
- Asserts that two shorts are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
short expected,
short actual,
int assertLevel)
- Asserts that two shorts are equal.
- Parameters:
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
assertEquals
public void assertEquals(int expected,
int actual)
- Asserts that two ints are equal.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertEquals
public void assertEquals(String message,
int expected,
int actual)
- Asserts that two ints are equal.
- Parameters:
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.
assertEquals
public void assertEquals(int expected,
int actual,
int assertLevel)
- Asserts that two ints are equal.
- Parameters:
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
assertEquals
public void assertEquals(String message,
int expected,
int actual,
int assertLevel)
- Asserts that two ints are equal.
- Parameters:
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
assertNotNull
public void assertNotNull(Object object)
- Asserts that an object isn't null.
- Parameters:
object
- - The object to test for null
assertNotNull
public void assertNotNull(String message,
Object object)
- Asserts that an object isn't null.
- Parameters:
message
- - The message to print out if the assert failsobject
- - The object to test for null
assertNotNull
public void assertNotNull(Object object,
int assertLevel)
- Asserts that an object isn't null.
- Parameters:
object
- - The object to test for nullassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertNotNull
public void assertNotNull(String message,
Object object,
int assertLevel)
- Asserts that an object isn't null.
- Parameters:
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
assertNull
public void assertNull(Object object)
- Asserts that an object is null.
- Parameters:
object
- - The object to test for null
assertNull
public void assertNull(String message,
Object object)
- Asserts that an object is null.
- Parameters:
message
- - The message to print out if the assert failsobject
- - The object to test for null
assertNull
public void assertNull(Object object,
int assertLevel)
- Asserts that an object is null.
- Parameters:
object
- - The object to test for nullassertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertNull
public void assertNull(String message,
Object object,
int assertLevel)
- Asserts that an object is null.
- Parameters:
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
assertRegexMatches
public void assertRegexMatches(String text,
String regex)
- Asserts that given regex matches the provided text
- Parameters:
text
- - The text to match the regex againstregex
- - The regex to match.
assertRegexMatches
public void assertRegexMatches(String message,
String text,
String regex)
- Asserts that given regex matches the provided text
- Parameters:
message
- - The message to print out if the assert failstext
- - The text to match the regex againstregex
- - The regex to match.
assertRegexMatches
public void assertRegexMatches(String text,
String regex,
int assertLevel)
- Asserts that given regex matches the provided text
- Parameters:
text
- - The text to match the regex againstregex
- - The regex to match.assertLevel
- - Only run this test under the assertLevel as described in AssertLevel
assertRegexMatches
public void assertRegexMatches(String message,
String text,
String regex,
int assertLevel)
- Asserts that given regex matches the provided text
- Parameters:
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
assertSame
public void assertSame(Object expected,
Object actual)
- Asserts that two objects refer to the same object.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertSame
public void assertSame(String message,
Object expected,
Object actual)
- Asserts that two objects refer to the same object.
- Parameters:
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.
assertSame
public void assertSame(Object expected,
Object actual,
int assertLevel)
- Asserts that two objects refer to the same object.
- Parameters:
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
assertSame
public void assertSame(String message,
Object expected,
Object actual,
int assertLevel)
- Asserts that two objects refer to the same object.
- Parameters:
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
assertNotSame
public void assertNotSame(Object expected,
Object actual)
- Asserts that two objects refer to the same object.
- Parameters:
expected
- - The expected value.actual
- - The value to compare against the expected
or the actual value.
assertNotSame
public void assertNotSame(String message,
Object expected,
Object actual)
- Asserts that two objects refer to the same object.
- Parameters:
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.
assertNotSame
public void assertNotSame(Object expected,
Object actual,
int assertLevel)
- Asserts that two objects refer to the same object.
- Parameters:
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
assertNotSame
public void assertNotSame(String message,
Object expected,
Object actual,
int assertLevel)
- Asserts that two objects refer to the same object.
- Parameters:
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
addParam
public void addParam(Object param)
- Adds a ParamTag to the list of parameters
- Parameters:
param
- - the ParamTag to add
getParam
public Object getParam(int index)
- Gets the nth ParamTag.
- Parameters:
index
- - the index location of the desired ParamTag.
- Returns:
- the ParamTag located at index
getParams
public List getParams()
- Gets the list of ParamTags under this tag.
- Returns:
- the list of ParamTags under this tag.
getParamLength
public int getParamLength()
- Gets the number of ParamTags under this tag.
- Returns:
- the number of ParamTags under this tag.
delay
public void delay()
delay
public void delay(long delayTime)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.