|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.junit.Assert
net.sf.molae.pipe.test.ObjectTest<B>
public abstract class ObjectTest<B>
Test methods to check objects. Parent class for interface test beds.
Constructor Summary | |
---|---|
ObjectTest(B testObject)
Creates a new test with the specified candidate. |
Method Summary | |
---|---|
void |
assertConsistency()
Checks if the test object fulfils the equals and
hashCode contract. |
static void |
assertFalse(String message,
boolean condition)
Redefinition, because this method is not defined in older JUnit versions. |
protected void |
assertTestValuesSet()
Checks if the test values have been set. |
B |
getTestObject()
Returns the candidate (the object that is tested). |
protected void |
setTestValuesSet()
States that test values have been correctly set. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectTest(B testObject)
testObject
- the candidate of the test
NullPointerException
- if the specified test objects is
null
.Method Detail |
---|
public static final void assertFalse(String message, boolean condition)
message
- the message to be displayed if the assertion failscondition
- the condition to testpublic final B getTestObject()
public String toString()
toString
in class Object
public void assertConsistency()
equals
and
hashCode
contract.
AssertionFailedError
- if the a contract is broken by
the test object.protected void setTestValuesSet()
protected void assertTestValuesSet()
IllegalStateException
- if test values have not been set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |