This is a very small library but powerful enough to create most of your mockobjects for you. The ones it can't create, you can leverage the library to create.


Download MockLib library plus these web pages
Test coverage report
FindBugs report
MockLib Javadoc

All MockLib Examples

  1. Basic Examples - Basic Examples to help get started
  2. Listener Example 1 - How to mock listeners
  3. Listener Example 2 - How to test listener implementations
  4. Timer Example - How to test a Timer that goes off in 24 hours in just milliseconds
  5. Returning Mocks from Mocks - How to mock out a more complicated api.
  6. Advanced Example - A more advanced example combining things from different examples above
  7. Simulating Network Connections - Example on how to simulate network connection failures
  8. Running Snippets of Code - Example on how to tell a mockobject to run a snippet of code and why this needs to be done sometimes