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
- Test Multithreaded Code with Mock Objects15
- Mock Abstract and Concrete Classes16
- Use jMock with Languages Other Than Java17
- Upgrade from jMock 1 to jMock 218
- Use jMock in Maven Builds19
- Understand method dispatch in jMock 220
- Mock Classes in Eclipse Plug-in Tests21
To discuss or suggest entries in this Cookbook please join the jMock Users mailing list22.