Hammock - Mock Objects for Java ME
About
Hammock is a J2ME test double framework; in
particular it supports mock object test doubles. It has the following
features:
- Can be used with any Java ME Unit Test framework
like JMUnit, J2MEUnit and MoMEUnit. JMUnit is recommended though
because both JMUnit and Hammock can be integrated into an Ant build.
- Has mock objects for many of the MIDP and CLDC
classes and interfaces.
- Test doubles for classes from the optional PDA,
MMAPI, WMA and the popular kSOAP2 library are included.
- Allows expectations to be set that a method will
be invoked on a mock object and to specify the response behaviour.
- Includes a utility HammockMaker for mocking your
own classes and interfaces. The utility can be run from the command line,
as an Ant task in a continuous build or as an Eclipse plug-in.
- Supports spy object
test doubles which can be useful for, in particular, looking at
interactions between a class under test and LCDUI (GUI)
collaborators.
Getting Hammock
Hammock can be downloaded from SourceForge.
The user guide, API and additional information
are also available online.
See also
JMUnit