The Open Enterprise Foundation

Mock Objects Library


The Mock Objects Library contains the following parts:

  • An expectation library to help define the expectations when creating mock objects
  • Alternative APIs for many of the common JDK and J2EE libraries, including network sockets, I/O, JDBC, Servlets, JMS, JNDI, and Java- Mail. These alternative APIs extend the conventional APIs to include clean interface separations from implementations, which allows code that depends on these interfaces to be passed mock implementations — as well as any other custom implementation — as needed
  • Mock implementations for the APIs mentioned previously
  • A library for dynamically creating mocks at runtime from your unit tests without having to define extra classes. This uses dynamic proxies