A base class for tests that use
Mock Objects.
This class provides methods for creating mock objects and expectations and automatically
verifying mock objects after the test has run, but before the test fixture has been torn down.
defaultMockNameForType
public String defaultMockNameForType(Class mockedType)
mock
public Mock mock(Class mockedType)
mock
public Mock mock(Class mockedType,
String roleName)
newCoreMock
protected DynamicMock newCoreMock(Class mockedType,
String roleName)
onConsecutiveCalls
public Stub onConsecutiveCalls(Stub stub1,
Stub stub2)
onConsecutiveCalls
public Stub onConsecutiveCalls(Stub stub1,
Stub stub2,
Stub stub3)
returnValue
public Stub returnValue(Object o)
returnValue
public Stub returnValue(boolean result)
returnValue
public Stub returnValue(byte result)
returnValue
public Stub returnValue(char result)
returnValue
public Stub returnValue(double result)
returnValue
public Stub returnValue(float result)
returnValue
public Stub returnValue(int result)
returnValue
public Stub returnValue(long result)
returnValue
public Stub returnValue(short result)
throwException
public Stub throwException(Throwable throwable)