|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMocksControl
Controls all the mock objects created by it. For details, see the EasyMock documentation.
Method Summary | ||
---|---|---|
void |
checkIsUsedInOneThread(boolean shouldBeUsedInOneThread)
Check that the mock is called from only one thread |
|
void |
checkOrder(boolean state)
Switches order checking on and off. |
|
|
createMock(Class<T> toMock)
Creates a mock object that implements the given interface. |
|
|
createMock(Class<T> toMock,
ConstructorArgs constructorArgs,
Method... mockedMethods)
Deprecated. Use EasyMock.createMockBuilder(Class) instead |
|
|
createMock(Class<T> toMock,
Method... mockedMethods)
Deprecated. Use EasyMock.createMockBuilder(Class) instead |
|
|
createMock(String name,
Class<T> toMock)
Creates a mock object that implements the given interface. |
|
|
createMock(String name,
Class<T> toMock,
ConstructorArgs constructorArgs,
Method... mockedMethods)
Deprecated. Use EasyMock.createMockBuilder(Class) instead |
|
|
createMock(String name,
Class<T> toMock,
Method... mockedMethods)
Deprecated. Use EasyMock.createMockBuilder(Class) instead |
|
void |
makeThreadSafe(boolean threadSafe)
Makes the mock thread safe. |
|
void |
replay()
Switches the control from record mode to replay mode. |
|
void |
reset()
Removes all expectations for the mock objects of this control. |
|
void |
resetToDefault()
Removes all expectations for the mock objects of this control and turn them to default mocks. |
|
void |
resetToNice()
Removes all expectations for the mock objects of this control and turn them to nice mocks. |
|
void |
resetToStrict()
Removes all expectations for the mock objects of this control and turn them to strict mocks. |
|
void |
verify()
Verifies that all expectations were met. |
Method Detail |
---|
<T> T createMock(Class<T> toMock)
T
- the interface or class that the mock object should
implement/extend.toMock
- the interface or class that the mock object should
implement/extend.
<T> T createMock(String name, Class<T> toMock)
T
- the interface or class that the mock object should
implement/extend.name
- the name of the mock object.toMock
- the interface or class that the mock object should
implement/extend.
IllegalArgumentException
- if the name is not a valid Java identifier.@Deprecated <T> T createMock(Class<T> toMock, Method... mockedMethods)
EasyMock.createMockBuilder(Class)
instead
T
- the class that the mock object should extend.toMock
- the class that the mock object should extend.mockedMethods
- methods that will be mocked, other methods will behave
normally
@Deprecated <T> T createMock(Class<T> toMock, ConstructorArgs constructorArgs, Method... mockedMethods)
EasyMock.createMockBuilder(Class)
instead
T
- the class that the mock object should extend.toMock
- the class that the mock object should extend.constructorArgs
- constructor and parameters used to instantiate the mock.mockedMethods
- methods that will be mocked, other methods will behave
normally
@Deprecated <T> T createMock(String name, Class<T> toMock, Method... mockedMethods)
EasyMock.createMockBuilder(Class)
instead
T
- the class that the mock object should extend.name
- the name of the mock object.toMock
- the class that the mock object should extend.mockedMethods
- methods that will be mocked, other methods will behave
normally
@Deprecated <T> T createMock(String name, Class<T> toMock, ConstructorArgs constructorArgs, Method... mockedMethods)
EasyMock.createMockBuilder(Class)
instead
T
- the class that the mock object should extend.name
- the name of the mock object.toMock
- the class that the mock object should extend.constructorArgs
- constructor and parameters used to instantiate the mock.mockedMethods
- methods that will be mocked, other methods will behave
normally
void reset()
void resetToNice()
void resetToDefault()
void resetToStrict()
void replay()
void verify()
void checkOrder(boolean state)
state
- true
switches order checking on,
false
switches it off.void makeThreadSafe(boolean threadSafe)
threadSafe
- If the mock should be thread safe or notvoid checkIsUsedInOneThread(boolean shouldBeUsedInOneThread)
shouldBeUsedInOneThread
- If it should be used in one thread only or not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |