Mockito is a really nice and useful Mock framework and it has a powerful implementation of test spies. Spied objects can be partially stubbed, without changing the overall behavior of the object. Spying EOs requires a couple of boilerplate code and the WOUnit annotations cannot be used:
I have to check if the @Spy annotation from Mockito will play nice in this scenario. Otherwise, the WOUnit can provide a different annotation (@Spied maybe) to avoid naming clash.
IMPORTANT: Mockito must not be a requirement for people in order to make use of WOUnit.
Mockito is a really nice and useful Mock framework and it has a powerful implementation of test spies. Spied objects can be partially stubbed, without changing the overall behavior of the object. Spying EOs requires a couple of boilerplate code and the WOUnit annotations cannot be used:
@Test public void testSomething() { Foo foo = Mockito.spy(new Foo()); ec.insertSavedObject(foo); }
We could offer a better option:
@Spy @Dummy private Foo foo;
I have to check if the @Spy annotation from Mockito will play nice in this scenario. Otherwise, the WOUnit can provide a different annotation (@Spied maybe) to avoid naming clash.
IMPORTANT: Mockito must not be a requirement for people in order to make use of WOUnit.