org.easymock
public class EasyMockSupport extends Object
| Field Summary | |
|---|---|
| protected List<IMocksControl> | controls List of all controls created |
| Method Summary | |
|---|---|
| IMocksControl | createControl()
Creates a control, order checking is disabled by default.
|
| <T> T | createMock(Class<T> toMock)
Creates a mock object that implements the given interface, order checking
is disabled by default.
|
| <T> T | createMock(String name, Class<T> toMock)
Creates a mock object that implements the given interface, order checking
is disabled by default.
|
| IMocksControl | createNiceControl()
Creates a control, order checking is disabled by default, and the mock
objects created by this control will return 0,
null or false for unexpected invocations.
|
| <T> T | createNiceMock(Class<T> toMock)
Creates a mock object that implements the given interface, order checking
is disabled by default, and the mock object will return 0,
null or false for unexpected invocations.
|
| <T> T | createNiceMock(String name, Class<T> toMock)
Creates a mock object that implements the given interface, order checking
is disabled by default, and the mock object will return 0,
null or false for unexpected invocations.
|
| IMocksControl | createStrictControl()
Creates a control, order checking is enabled by default.
|
| <T> T | createStrictMock(Class<T> toMock)
Creates a mock object that implements the given interface, order checking
is enabled by default.
|
| <T> T | createStrictMock(String name, Class<T> toMock)
Creates a mock object that implements the given interface, order checking
is enabled by default.
|
| void | replayAll()
Switches all registered mock objects (more exactly: the controls of the
mock objects) to replay mode. |
| void | resetAll()
Resets all registered mock objects (more exactly: the controls of the
mock objects). |
| void | resetAllToDefault()
Resets all registered mock objects (more exactly: the controls of the
mock objects) and turn them to a mock with default behavior. |
| void | resetAllToNice()
Resets all registered mock objects (more exactly: the controls of the
mock objects) and turn them to a mock with nice behavior. |
| void | resetAllToStrict()
Resets all registered mock objects (more exactly: the controls of the
mock objects) and turn them to a mock with strict behavior. |
| void | verifyAll()
Verifies all registered mock objects (more exactly: the controls of the
mock objects). |
Returns: the control.
Parameters:
Returns: the mock object.
Parameters: name
the name of the mock object. toMock
the class of the interface that the mock object should
implement.
Returns: the mock object.
Throws: IllegalArgumentException if the name is not a valid Java identifier.
0,
null or false for unexpected invocations.
Returns: the control.
0,
null or false for unexpected invocations.
Parameters:
Returns: the mock object.
0,
null or false for unexpected invocations.
Parameters: name
the name of the mock object. toMock
the class of the interface that the mock object should
implement.
Returns: the mock object.
Throws: IllegalArgumentException if the name is not a valid Java identifier.
Returns: the control.
Parameters:
Returns: the mock object.
Parameters: name
the name of the mock object. toMock
the class of the interface that the mock object should
implement.
Returns: the mock object.
Throws: IllegalArgumentException if the name is not a valid Java identifier.