concept JMock in category java

appears as: JMock, JMock
JUnit in Action, Second Edition

This is an excerpt from Manning's book JUnit in Action, Second Edition.

  • Introducing the EasyMock and the JMock libraries
  • 7.6.2. Using JMock

    So far we showed how to implement our own mock objects and how to use the EasyMock framework. In this section we introduce the JMock framework (http://jmock.org/), so that we can have a full view of the different mocking techniques. As in the previous section, we start with a simple example: reworking listing 7.4 by means of JMock. See listing 7.17.

    Listing 7.17. Reworking the TestAccountService test using JMock