InvocationMatcher
, SelfDescribing
, Verifiable
InvokeAtLeastOnceMatcher
, InvokeAtMostOnceMatcher
, InvokeCountMatcher
, InvokeOnceMatcher
public class InvokedRecorder extends java.lang.Object implements InvocationMatcher
Constructor | Description |
---|---|
InvokedRecorder() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.StringBuffer |
describeTo(java.lang.StringBuffer buffer) |
Appends the description of this object to the buffer.
|
int |
getInvocationCount() |
|
boolean |
hasBeenInvoked() |
|
boolean |
hasDescription() |
|
void |
invoked(Invocation invocation) |
|
boolean |
matches(Invocation invocation) |
|
void |
verify() |
Throw an AssertionFailedException if any expectations have not been met.
|
void |
verifyHasBeenInvoked() |
|
void |
verifyHasBeenInvokedExactly(int expectedCount) |
public int getInvocationCount()
public boolean hasBeenInvoked()
public boolean matches(Invocation invocation)
matches
in interface InvocationMatcher
public void invoked(Invocation invocation)
invoked
in interface InvocationMatcher
public boolean hasDescription()
hasDescription
in interface InvocationMatcher
public java.lang.StringBuffer describeTo(java.lang.StringBuffer buffer)
SelfDescribing
describeTo
in interface SelfDescribing
buffer
- The buffer that the description is appended to.public void verify()
Verifiable
verify
in interface Verifiable
public void verifyHasBeenInvoked()
public void verifyHasBeenInvokedExactly(int expectedCount)