Hammock 2.1

A software that allows you to mock objects for Java ME.
Hammock is a software that allows you to mock objects for Java ME.

Unit-testing with the xUnit family of test frameworks has become popular as agile development methodologies have gained acceptance. For J2ME there are several derivatives of JUnit (for example, JMUnit, J2MEUnit and MoMEUnit). The goal of unit testing is that each class should be tested in isolation from other classes. However, in practice, this can be difficult since classes need to collaborate to do anything useful. A popular method to work around this dependency problem is to use mock objects.

A mock object stands in for a real object that a class under test collaborates with. The test code specifies how the mock object should respond when the class under test calls methods on the mock object. By using a mock object rather than the real object we ensure that bugs in the collaborating class don't cause tests for the class under test to fail. Also, the use of mock objects allows us to simulate scenarios that may be difficult to configure for the real object (for example, a network fault).

last updated on:
June 10th, 2009, 15:14 GMT
license type:
The Apache License 2.0 
developed by:
Ernest Hammingweight
ROOT \ Programming \ Quality Assurance and Testing
Download Button

In a hurry? Add it to your Download Basket!

user rating 29



Rate it!
What's New in This Release:
  • Added a plug-in for Eclipse.
  • Fixed a bug (static inner classes can now be mocked).
read full changelog

Add your review!