org.jmock.util
Class Verifier
Helper class to verify all
Verifiable
fields of an 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 mock objects implement
Verifiable
by delegation.
$Id: Verifier.java,v 1.6 2004/05/05 08:52:48 npryce Exp $static void | verifyObject(Object anObject) - Verifies all the fields of type Verifiable in the given object, including
those inherited from superclasses.
|
verifyObject
public static void verifyObject(Object anObject)
Verifies all the fields of type Verifiable in the given object, including
those inherited from superclasses.
anObject
- The object to be verified.