Re: [hibernate-dev] Mocking for unit tests

2011-03-29 Thread Emmanuel Bernard
+1 On 29 mars 2011, at 18:53, Tom Waterhouse wrote: > Emmanuel, > > The unit test in question is functional, in that it extends SearchTestCase. > The test requires verification that searchFactoryImplementor.getWorker() is > never called by FullTextIndexEventListener. Mockito is used in the c

Re: [hibernate-dev] Mocking for unit tests

2011-03-29 Thread Tom Waterhouse
Emmanuel, The unit test in question is functional, in that it extends SearchTestCase. The test requires verification that searchFactoryImplementor.getWorker() is never called by FullTextIndexEventListener. Mockito is used in the current test 1) to mock both SearchFactoryImplementor and Worker, a

Re: [hibernate-dev] Mocking for unit tests

2011-03-29 Thread Emmanuel Bernard
Hi Tom, Most tests in HSearch are more integration / functional tests than true unit tests. Since we can tests everything with in-memory components it ends up quite fast and more "real life". If you feel that there is no way to reproduce the issue at hand in a functional test, is that: - beca