The jMock Cookbook
How to...
- Get Started1
- Define Expectations2
- Return Values from Mocked Methods3
- Throw Exceptions from Mocked Methods4
- Match Parameter Values5
- Precisely Specify Expected Parameter Values6
- Expect Methods More (or Less) than Once7
- Expect a Sequence of Invocations8
- Expect an Invocation Between Two Other Invocations9
- Ignore Irrelevant Mock Objects10
- Override Expectations Defined in the Test Set-Up11
- Match Objects and Methods12
- Write New Matchers13
- Write New Actions14
- Easily Define Actions with Scripts15
- Test Multithreaded Code with Mock Objects16
- Mock Generic Types17
- Mock Abstract and Concrete Classes18
- Use jMock with Languages Other Than Java19
- Upgrade from jMock 1 to jMock 220
- Use jMock in Maven Builds21
- Understand method dispatch in jMock 222
- Mock Classes in Eclipse Plug-in Tests23
- Mock asynchronous GWT services24
To discuss or suggest entries in this Cookbook please join the jMock Users mailing list25.