Package org.jmock.core
Class InvocationMocker
java.lang.Object
org.jmock.core.InvocationMocker
- All Implemented Interfaces:
Invokable,SelfDescribing,StubMatchersCollection,Verifiable
- Since:
- 1.0
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMatcher(InvocationMatcher matcher) describeTo(StringBuffer buffer) Appends the description of this object to the buffer.booleaninvoke(Invocation invocation) booleanmatches(Invocation invocation) voidvoidtoString()voidverify()Throw an AssertionFailedException if any expectations have not been met.
-
Field Details
-
DEFAULT_DESCRIBER
-
-
Constructor Details
-
InvocationMocker
public InvocationMocker() -
InvocationMocker
-
-
Method Details
-
matches
-
invoke
-
verify
public void verify()Description copied from interface:VerifiableThrow an AssertionFailedException if any expectations have not been met. Implementations of this method must be idempotent: jMock can call this method more than once when verifying expectations at the end of a test.- Specified by:
verifyin interfaceVerifiable
-
setName
- Specified by:
setNamein interfaceStubMatchersCollection
-
addMatcher
- Specified by:
addMatcherin interfaceStubMatchersCollection
-
setStub
- Specified by:
setStubin interfaceStubMatchersCollection
-
toString
-
hasDescription
public boolean hasDescription()- Specified by:
hasDescriptionin interfaceInvokable
-
describeTo
Description copied from interface:SelfDescribingAppends the description of this object to the buffer.- Specified by:
describeToin interfaceSelfDescribing- Parameters:
buffer- The buffer that the description is appended to.- Returns:
- The buffer passed to the invokedMethod.
-