SEAF Test Commons

The SEAF Test Commons groups utility classes used in the SEAF projects in test scope.

It provides the following:

  • JMockSupport: support methods that simplify the use of JMock mock testing framework. (TestTemplate is an older, deprecated approach.)
  • JMockSeafMatchers: provides additional matchers to be used with JMock, currently containing deep equals matcher.
  • MockitoSeafMatchers: provides additional matchers to be used with Mockito, currently containing deep equals matcher.
  • TestDataCreator: creates an instance of a bean of a given class, automatically populating its properties with generated values, so that it can be for example used in unit or integration tests.
  • TemplatingTestBase: a base class for JUnit tests that compare content of a generated file with a fixed template file.

TestTemplate tutorial

The following provides a tutorial of TestTemplate (please note that TestTemplate is now deprecated in favor of JMockSupport, which is documented in its JavaDoc):


This project is part of SEAF, which is hosted by Sourceforge.net.

SEAF at Sourceforge.net