|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jtiger.assertion.ObjectFactoryContract
public final class ObjectFactoryContract
Provides the ability to make assertions on the contract defined by ObjectFactory.
The contract has five (5) aspects, which are specified by ObjectFactory.
ObjectFactory| Method Summary | |
|---|---|
static void |
assertObjectFactoryFillsContract(ObjectFactory<?> factory,
Object... message)
Asserts that the given ObjectFactory meets the entire contract. |
static void |
assertObjectFactoryXConsistentlyEqual(ObjectFactory<?> factory,
Object... message)
Asserts that the given ObjectFactory meets one aspect of the entire contract. |
static void |
assertObjectFactoryXConsistentlyNewInstance(ObjectFactory<?> factory,
Object... message)
Asserts that the given ObjectFactory meets one aspect of the entire contract. |
static void |
assertObjectFactoryXYConsistentlyUnequal(ObjectFactory<?> factory,
Object... message)
Asserts that the given ObjectFactory meets one aspect of the entire contract. |
static void |
assertObjectFactoryYConsistentlyEqual(ObjectFactory<?> factory,
Object... message)
Asserts that the given ObjectFactory meets one aspect of the entire contract. |
static void |
assertObjectFactoryYConsistentlyNewInstance(ObjectFactory<?> factory,
Object... message)
Asserts that the given ObjectFactory meets one aspect of the entire contract. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void assertObjectFactoryXConsistentlyNewInstance(ObjectFactory<?> factory,
Object... message)
throws AssertionException
ObjectFactory meets one aspect of the entire contract.
The ObjectFactory.newInstanceX() method must consistently return new instances.
factory - The object factory to assert has met the aspect of the contract.message - The assertion message.
AssertionException - If the ObjectFactory.newInstanceX() method does not consistently return new
instances.
public static void assertObjectFactoryYConsistentlyNewInstance(ObjectFactory<?> factory,
Object... message)
throws AssertionException
ObjectFactory meets one aspect of the entire contract.
The ObjectFactory.newInstanceY() method must consistently return new instances.
factory - The object factory to assert has met the aspect of the contract.message - The assertion message.
AssertionException - If the ObjectFactory.newInstanceY() method does not consistently return new
instances.
public static void assertObjectFactoryXConsistentlyEqual(ObjectFactory<?> factory,
Object... message)
throws AssertionException
ObjectFactory meets one aspect of the entire contract.
The ObjectFactory.newInstanceX() method must consistently return equal instances.
factory - The object factory to assert has met the aspect of the contract.message - The assertion message.
AssertionException - If the ObjectFactory.newInstanceX() method does not consistently return equal
instances.
public static void assertObjectFactoryYConsistentlyEqual(ObjectFactory<?> factory,
Object... message)
throws AssertionException
ObjectFactory meets one aspect of the entire contract.
The ObjectFactory.newInstanceY() method must consistently return equal instances.
factory - The object factory to assert has met the aspect of the contract.message - The assertion message.
AssertionException - If the ObjectFactory.newInstanceY() method does not consistently return equal
instances.
public static void assertObjectFactoryXYConsistentlyUnequal(ObjectFactory<?> factory,
Object... message)
throws AssertionException
ObjectFactory meets one aspect of the entire contract.
The ObjectFactory.newInstanceX() method must consistently return instances that are unequal to instances
returned by the ObjectFactory.newInstanceY() method.
factory - The object factory to assert has met the aspect of the contract.message - The assertion message.
AssertionException - If the ObjectFactory.newInstanceY() method does not consistently return
instances that are unequal to instances returned by the ObjectFactory.newInstanceY() method.
public static void assertObjectFactoryFillsContract(ObjectFactory<?> factory,
Object... message)
throws AssertionException
ObjectFactory meets the entire contract.
factory - The object factory to assert has met the contract.message - The assertion message.
AssertionException - If the object factory does not meet the entire contract.ObjectFactory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||