org.easymock
public class Capture<T> extends Object implements Serializable
capture() matcher. Knows
if something was captured or not (allows to capture a null value).
Parameters:
| Constructor Summary | |
|---|---|
| Capture()
Default constructor. | |
| Capture(CaptureType type)
Constructor allowing to select the capture type
| |
| Method Summary | |
|---|---|
| T | getValue()
Return captured value
|
| List<T> | getValues()
Return all captured values. |
| boolean | hasCaptured() |
| void | reset()
Will reset capture to a "nothing captured yet" state |
| void | setValue(T value)
Used internally by the EasyMock framework to add a new captured value
|
Parameters: type capture type
Returns: The last captured value
Throws: AssertionError if nothing was captured yet or if more than one value was captured
Returns: The currently captured values
Returns: true if something was captured
Parameters: value Value captured