|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase jtge.util.EasyMockTestCase
Extends a JUnit TestCase with several EasyMock related features.
This extension provides the following benefits :
As a consequence the tests are easier to write and end up being simpler.
TODO add nice and strict mock support
Constructor Summary | |
EasyMockTestCase()
Create an easy mock test case. |
Method Summary | |
protected org.easymock.MockControl |
control(java.lang.Object mock)
Access the control object associated to a mock object. |
protected java.lang.Object |
createMock(java.lang.Class type)
Factory method to create a mock object of a given type. |
protected void |
replay()
Set all mock objects to replay mode. |
protected void |
reset()
Reset all mock objects expectations. |
void |
runBare()
|
protected void |
verify()
Verify all mock objects expectations. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EasyMockTestCase()
Method Detail |
public final void runBare() throws java.lang.Throwable
java.lang.Throwable
protected final java.lang.Object createMock(java.lang.Class type)
type
- the type of the mock object to create
protected final void reset()
The state of mock objects is then the same as at the beginning of the test.
protected final void replay()
protected final void verify()
This method is automatically called at the end of each test.
protected final org.easymock.MockControl control(java.lang.Object mock)
mock
- the mock object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |