public class MethodStubStrategyImpl<T> extends java.lang.Object implements MethodStubStrategy<T>
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
method |
Constructor and Description |
---|
MethodStubStrategyImpl(java.lang.reflect.Method method) |
Modifier and Type | Method and Description |
---|---|
void |
andReturn(T returnValue)
Deprecated.
|
void |
toReturn(T returnValue)
Stubs the method to return the specified returnValue.
|
void |
toThrow(java.lang.Throwable throwable)
Stubs the method to throw the specified throwable.
|
public MethodStubStrategyImpl(java.lang.reflect.Method method)
@Deprecated public void andReturn(T returnValue)
MethodStubStrategy
andReturn
in interface MethodStubStrategy<T>
returnValue
- The value that will be returned.public void toThrow(java.lang.Throwable throwable)
MethodStubStrategy
toThrow
in interface MethodStubStrategy<T>
throwable
- the throwablepublic void toReturn(T returnValue)
MethodStubStrategy
toReturn
in interface MethodStubStrategy<T>
returnValue
- The value that will be returned.