|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmock.expectation.Verifier
Helper class to verify all Expectation
s
of an object.
The Verifier
class provides two static
methods to verify objects:
verifyObject(Object)
verifyField(Field, Object)
Example usage:
Verifying all expectations on one object at a time:
public class MockX implements Verifiable { private Expectation... anExpectation = new Expectation...(...); private Expectation... aSecondExpectation = new Expectation...(...); public void verify() { Verifier.verifyObject(this); } }This example shows how most mocks implement
Verifiable
, i.e.: by delegation.
Expectation
,
Verifiable
Constructor Summary | |
Verifier()
|
Method Summary | |
static void |
verifyObject(java.lang.Object anObject)
Verifies all the fields of type Verifiable in the given object, including those inherited from superclasses. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Verifier()
Method Detail |
public static void verifyObject(java.lang.Object anObject)
anObject
- The object to be verified.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |