Package com.mockobjects.util
Class Verifier
- java.lang.Object
-
- com.mockobjects.util.Verifier
-
public class Verifier extends java.lang.Object
Helper class to verify allExpectation
s of an object. TheVerifier
class provides two static methods to verify objects: These two methods can be used to verify any expectation to assert that they still hold.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 implementVerifiable
, i.e.: by delegation.- Version:
- $Id: Verifier.java,v 1.5 2002/09/29 16:44:28 smgf Exp $
- See Also:
Expectation
,Verifiable
-
-
Constructor Summary
Constructors Constructor Description Verifier()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
verifyObject(java.lang.Object anObject)
Verifies all the fields of type Verifiable in the given object, including those inherited from superclasses.
-