Projects / Hammock

Hammock

Hammock is a mock object framework for J2ME devices. It is used in conjunction with unit test frameworks like JMUnit and J2MEUnit. The framework includes mocks for many of the J2ME UI and I/O classes as well as a utility, HammockMaker, for generating mocks of other classes.

Tags
Licenses
Implementation

Recent releases

  •  10 Jun 2009 08:25

    Release Notes: An Eclipse plug-in has been added, making it simpler to create mock objects in the Eclipse IDE. A bug has been fixed; it is now possible to mock static inner classes.

    •  24 Feb 2009 07:29

      Release Notes: This release is a significant code cleanup of version 1.6. Nine classes have been removed. The retained classes have also been significantly refactored with methods being given more descriptive names or removed altogether. Support for spy objects has been improved with three new classes added. Overall the number of core classes has been reduced from 27 to 21. Because of the large number of changes from version 1.6 to 2.0, Hammock 2.0 is recommended only for new projects.

      •  02 Feb 2009 10:42

        Release Notes: This release adds better support for spy objects. Developers who prefer the Arrange-Act-Assert (AAA) idiom to record-and-replay may like to use the new coding style supported by the spy objects.

        •  05 Jan 2009 14:04

          Release Notes: A new method invocation handler was added, which requires less boilerplate code than the CompositeHandler class for setting expectations on mocks of concrete classes. The user guide has been trimmed from 33 pages to 20 pages. A reference guide has been added to the release. Examples use the recent JMUnit 1.2 Ant tasks for running tests as part of the build.

          •  10 Jun 2008 09:24

            Release Notes: This release adds an IArgumentMatcher interface that can be associated with an expectation. The argument matcher is used to verify that the expected and actual arguments passed in a mock object's method invocation are correct. The sample applications now include a J2MEUnit example in addition to the JMUnit examples. The HammockMaker example has been improved. The user guide includes a section on Hammock's internals describing the core classes of the framework. Mocks of the JSR211 (CHAPI) interfaces have been added.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.