net.sf.molae.bean.test
Class GenericBeanTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--net.sf.molae.pipe.test.ObjectTest
              |
              +--net.sf.molae.bean.test.GenericBeanTest

public class GenericBeanTest
extends ObjectTest

Test methods to check the contract of generic bean implementing classes.

Since:
1.1

Constructor Summary
protected GenericBeanTest(GenericBean testObject)
          Creates a new test with the specified candidate.
 
Method Summary
 void assertConsistency()
          Checks consistency of all reading GenericBean methods.
static GenericBeanTest getInstance(GenericBean testObject)
          Creates a new instance of this class with the specified testObject as test object.
 
Methods inherited from class net.sf.molae.pipe.test.ObjectTest
assertFalse, getTestObject, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericBeanTest

protected GenericBeanTest(GenericBean testObject)
Creates a new test with the specified candidate.
Parameters:
testObject - the candidate of the test
Throws:
NullPointerException - if the specified test objects is null.
Method Detail

getInstance

public static final GenericBeanTest getInstance(GenericBean testObject)
Creates a new instance of this class with the specified testObject as test object.
Parameters:
testObject - the candidate of the test
Returns:
an instance of this class with the specified testObject as test object.
Throws:
NullPointerException - if the specified test objects is null.

assertConsistency

public void assertConsistency()
Checks consistency of all reading GenericBean methods.
Overrides:
assertConsistency in class ObjectTest
Throws:
AssertionFailedError - if the generic bean contract is broken by the tested bean.