org.jmock.core.matcher
Class InvokedRecorder

java.lang.Object
  extended by org.jmock.core.matcher.InvokedRecorder
All Implemented Interfaces:
InvocationMatcher, SelfDescribing, Verifiable
Direct Known Subclasses:
InvokeAtLeastOnceMatcher, InvokeCountMatcher, InvokeOnceMatcher

public class InvokedRecorder
extends Object
implements InvocationMatcher


Constructor Summary
InvokedRecorder()
           
 
Method Summary
 StringBuffer describeTo(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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvokedRecorder

public InvokedRecorder()
Method Detail

getInvocationCount

public int getInvocationCount()

hasBeenInvoked

public boolean hasBeenInvoked()

matches

public boolean matches(Invocation invocation)
Specified by:
matches in interface InvocationMatcher

invoked

public void invoked(Invocation invocation)
Specified by:
invoked in interface InvocationMatcher

hasDescription

public boolean hasDescription()
Specified by:
hasDescription in interface InvocationMatcher

describeTo

public StringBuffer describeTo(StringBuffer buffer)
Description copied from interface: SelfDescribing
Appends the description of this object to the buffer.

Specified by:
describeTo in interface SelfDescribing
Parameters:
buffer - The buffer that the description is appended to.
Returns:
The buffer passed to the invokedMethod.

verify

public void verify()
Description copied from interface: Verifiable
Throw an AssertionFailedException if any expectations have not been met.

Specified by:
verify in interface Verifiable

verifyHasBeenInvoked

public void verifyHasBeenInvoked()

verifyHasBeenInvokedExactly

public void verifyHasBeenInvokedExactly(int expectedCount)