Package org.jmock.core.matcher
Class InvokeCountMatcher
java.lang.Object
org.jmock.core.matcher.InvokedRecorder
org.jmock.core.matcher.InvokeCountMatcher
- All Implemented Interfaces:
InvocationMatcher
,SelfDescribing
,Verifiable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescribeTo
(StringBuffer buffer) Appends the description of this object to the buffer.boolean
boolean
matches
(Invocation invocation) void
verify()
Throw an AssertionFailedException if any expectations have not been met.Methods inherited from class org.jmock.core.matcher.InvokedRecorder
getInvocationCount, hasBeenInvoked, invoked, verifyHasBeenInvoked, verifyHasBeenInvokedExactly
-
Constructor Details
-
InvokeCountMatcher
public InvokeCountMatcher(int expectedCount)
-
-
Method Details
-
matches
- Specified by:
matches
in interfaceInvocationMatcher
- Overrides:
matches
in classInvokedRecorder
-
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
- Overrides:
verify
in classInvokedRecorder
-
hasDescription
public boolean hasDescription()- Specified by:
hasDescription
in interfaceInvocationMatcher
- Overrides:
hasDescription
in classInvokedRecorder
-
describeTo
Description copied from interface:SelfDescribing
Appends the description of this object to the buffer.- Specified by:
describeTo
in interfaceSelfDescribing
- Overrides:
describeTo
in classInvokedRecorder
- Parameters:
buffer
- The buffer that the description is appended to.- Returns:
- The buffer passed to the invokedMethod.
-