public interface IMocksControl
Modifier and Type | Method and Description |
---|---|
void |
checkIsUsedInOneThread(boolean shouldBeUsedInOneThread)
Check that the mock is called from only one thread
|
void |
checkOrder(boolean state)
Switches order checking on and off.
|
<T> T |
createMock(java.lang.Class<T> toMock)
Creates a mock object that implements the given interface.
|
<T> T |
createMock(java.lang.String name,
java.lang.Class<T> toMock)
Creates a mock object that implements the given interface.
|
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.
|
<T> T createMock(java.lang.Class<T> toMock)
T
- the interface that the mock object should implement.toMock
- the class of the interface that the mock object should implement.<T> T createMock(java.lang.String name, java.lang.Class<T> toMock)
T
- the interface that the mock object should implement.name
- the name of the mock object .toMock
- the class of the interface that the mock object should implement.java.lang.IllegalArgumentException
- if the name is not a valid Java identifier.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 notCopyright © 2001-2009 OFFIS, Tammo Freese, Henri Tremblay. This documentation is provided under the terms of the MIT licence.]]>