[hibernate-dev] Mocking for unit tests

Tom Waterhouse tomwaterhouse at gmail.com
Mon Mar 28 15:12:36 EDT 2011


I've completed a unit test for HSEARCH-679.  Testing the issue was made
easier using mock objects, as I needed to mock SearchFactoryImplementor and
Worker to determine if indexing work was created during transaction commit.

The mocking library I've used recently is Mockito, and is the library used
for the test.  I don't know that mocks have been used to this point for
Hibernate Search testing.  Mockito/mocking is acceptable?

You can see the test I created as an attachment to HSEARCH-679.

Tom



More information about the hibernate-dev mailing list