|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.xconf.toolbox.mockcontrol.MockObjectFactory
public class MockObjectFactory
This class wraps a MockFactory
instance and allows you to easily keep track of MockControls
for mock objects without needing to create a test variable for each control.
MockControlFactory| Constructor Summary | |
|---|---|
MockObjectFactory()
|
|
| Method Summary | |
|---|---|
void |
clear()
Clear all created MockControls and mock objects. |
org.easymock.MockControl |
control(Object mockObject)
Returns the MockControl instance associated with
the given mock object. |
Object |
createMock(Class clazz)
Creates a default mock object for the given class. |
Object |
createNiceMock(Class clazz)
Creates a nice mock object for the given class. |
Object |
createStrictMock(Class clazz)
Creates a strict mock object for the given class. |
void |
replay()
Invokes replay() on all MockControls created by this factory. |
void |
reset()
Invokes reset() on all MockControls created by this factory. |
void |
verify()
Invokes verify() on all MockControls created by this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockObjectFactory()
| Method Detail |
|---|
public Object createMock(Class clazz)
MockControl for this mock object by passing the
returned object to the control(Object) method.
MockFactory.createControl(Class)public Object createNiceMock(Class clazz)
MockControl for this mock object by passing the
returned object to the control(Object) method.
MockFactory.createNiceControl(Class)public Object createStrictMock(Class clazz)
MockControl for this mock object by passing the
returned object to the control(Object) method.
MockFactory.createStrictControl(Class)public org.easymock.MockControl control(Object mockObject)
MockControl instance associated with
the given mock object. This mock object must have been created
by one of the mock object creation methods above.
public void replay()
MockControls created by this factory.
public void reset()
MockControls created by this factory.
public void verify()
MockControls created by this factory.
public void clear()
MockControls and mock objects.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||