You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: