Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spied objects with Mockito #22

Closed
hprange opened this issue Oct 20, 2011 · 0 comments
Closed

Support spied objects with Mockito #22

hprange opened this issue Oct 20, 2011 · 0 comments
Assignees
Labels
Milestone

Comments

@hprange
Copy link
Owner

hprange commented Oct 20, 2011

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.

@ghost ghost assigned hprange Oct 20, 2011
@hprange hprange closed this as completed in ef8c728 Nov 6, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant