private class Mockery.MockObject extends java.lang.Object implements Invokable, CaptureControl
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<?> |
mockedType |
private java.lang.String |
name |
| Constructor and Description |
|---|
MockObject(java.lang.Class<?> mockedType,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
captureExpectationTo(ExpectationCapture capture) |
java.lang.Object |
invoke(Invocation invocation)
Performs an action in response to an invocation.
|
java.lang.String |
toString() |
public MockObject(java.lang.Class<?> mockedType,
java.lang.String name)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object invoke(Invocation invocation) throws java.lang.Throwable
Invokableinvoke in interface Invokableinvocation - The invocation to perform.null if the invoked method has a void return type.java.lang.Throwable - An exception to be thrown to the caller, if not returning a value. Any checked exception
thrown must be in the throws list of the invoked method.public java.lang.Object captureExpectationTo(ExpectationCapture capture)
captureExpectationTo in interface CaptureControl