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 TypeMethodDescriptionvoid
addMatcher
(InvocationMatcher matcher) describeTo
(StringBuffer buffer) Appends the description of this object to the buffer.boolean
invoke
(Invocation invocation) boolean
matches
(Invocation invocation) void
void
toString()
void
verify()
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:Verifiable
Throw 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:
verify
in interfaceVerifiable
-
setName
- Specified by:
setName
in interfaceStubMatchersCollection
-
addMatcher
- Specified by:
addMatcher
in interfaceStubMatchersCollection
-
setStub
- Specified by:
setStub
in interfaceStubMatchersCollection
-
toString
-
hasDescription
public boolean hasDescription()- Specified by:
hasDescription
in interfaceInvokable
-
describeTo
Description copied from interface:SelfDescribing
Appends the description of this object to the buffer.- Specified by:
describeTo
in interfaceSelfDescribing
- Parameters:
buffer
- The buffer that the description is appended to.- Returns:
- The buffer passed to the invokedMethod.
-