T - Type of the value capturedpublic class Captures<T> extends Object implements IArgumentMatcher, Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(StringBuffer buffer)
Appends a string representation of this matcher to the given buffer.
|
boolean |
matches(Object actual)
Returns whether this matcher accepts the given argument.
|
void |
setPotentialValue(T potentialValue) |
void |
validateCapture() |
public void appendTo(StringBuffer buffer)
IArgumentMatcherappendTo in interface IArgumentMatcherbuffer - the buffer to which the string representation is appended.public void setPotentialValue(T potentialValue)
public boolean matches(Object actual)
IArgumentMatcherLike Object.equals(), it should be aware that the argument passed might be null and of any type. So you will usually start the method with an instanceof and/or null check.
The method should never assert if the argument doesn't match. It should only return false. EasyMock will take care of asserting if the call is really unexpected.
matches in interface IArgumentMatcheractual - the argumentpublic void validateCapture()
Copyright © 2001–2014 EasyMock contributors. All rights reserved.