JDummy is a thin API which sits above JMock. It allows very succinct expectation setting code when the expectation code would normally involve many stubs.
The sections below illustrate using JDummy for the mocking parts of Using Testing Frameworks with Groovy.
The Item Storer Example
We are going to consider how you might use JDummy as part of testing the Item Storer Example.
Here is how we can test
Note: Our example is so simple, that JDummy's power is not really illustrated here.