RMock - a Java test-double framework

RMock 2.0.0 is a Java mock object framework to use with jUnit. RMock has support for a setup-modify-run-verify workflow when writing jUnit tests. It integrates better with IDE refactoring support and allows designing classes and interfaces in a true test-first fashion.

Why RMock?

  • It enhances both interaction-based and state-based testing
  • It has a well defined workflow and clear test states
  • RMock provides you with explicit error messages to shorten your feedback cycle
  • Creating and working with test-doubles of interfaces and concrete or abstract classes is done in a transparent manner
  • RMocks DynamicSuite will solve problems of maintaining your TestSuites
  • Expectations can be grouped and ordered in almost any way using sections
  • The state-based assertThat( actual, <constraint>) method gives you more power than traditional jUnit's assertXxx(...), and more information when the assertion fails
If you are looking for the mock framework for Ruby, please visit the Mockr homepage.