Menu Close

Mock Objects

For all your unit testing needs… Mock Objects! Fake JDBC, JMS, javaxmail, socket connections, files, etcetera. Version 0.4 release is available. The Mock Objects project is a generic unit testing framework whose goal is to facilitate developing unit tests in the mock object style. The goal of this project is to provide:

  • A core mock objects framework. This is a library of code that supports the implementation of mock objects. It is based around a set of expectation classes for values and collections. There are also various other classes to make mock objects easier to write or to use.
  • A methodology for developing and using mock objects.
  • A default set of mock implementation for the standard Java platform APIs. We have made a start on packages such as servlets, sql, and io.
  • Mock implementations for more specialised libraries, particularly third party products. So far, we have started on ATG Dynamo and IBM’s VisualAge for Java tools API.
  • A community for exchanging ideas on anything related to unit testing, with a bias towards Mock Objects.
  • This is excellent. As a JUnit bigot, I like to see people so commited to testing that they actually take the time to create these. I’m downloading it right now, and you should too..