org.easymock

Interface IMocksControl

All Superinterfaces:
IExpectationSetters

public interface IMocksControl
extends IExpectationSetters

Controls all the mock objects created by it. For details, see the EasyMock documentation.

Method Summary

T createMock(Class toMock)
Creates a mock object that implements the given interface.
T createMock(String name, Class toMock)
Creates a mock object that implements the given interface.
void
checkOrder(boolean state)
Switches order checking on and off.
void
replay()
Switches the control from record mode to replay mode.
void
reset()
Removes all expectations for the mock objects of this control.
void
verify()
Verifies that all expectations were met.

Method Details

T createMock

public  T createMock(Class toMock)
Creates a mock object that implements the given interface.
Parameters:
toMock - the class of the interface that the mock object should implement.
Returns:
the mock object.

T createMock

public  T createMock(String name,
                        Class toMock)
Creates a mock object that implements the given interface.
Parameters:
name - the name of the mock object .
toMock - the class of the interface that the mock object should implement.
Returns:
the mock object.

checkOrder

public void checkOrder(boolean state)
Switches order checking on and off.
Parameters:
state - true switches order checking on, false switches it off.

replay

public void replay()
Switches the control from record mode to replay mode.

reset

public void reset()
Removes all expectations for the mock objects of this control.

verify

public void verify()
Verifies that all expectations were met.