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

@UnderTest annotation to create the EO being tested #10

Closed
hprange opened this issue May 22, 2011 · 0 comments
Closed

@UnderTest annotation to create the EO being tested #10

hprange opened this issue May 22, 2011 · 0 comments
Assignees
Labels
Milestone

Comments

@hprange
Copy link
Owner

hprange commented May 22, 2011

When testing an EO, usually a basic setup have to be made in order to test an EO:

private EO eo;

@before
pubic void setup() {
eo = EO.createEO(ec);
}

The @undertest annotation could be used to reduce the amount of boilerplate code.

@undertest private EO eo;

The MockEditingContext and the TemporaryEditingContext rules creates and inserts the EO automagically.

The annotation is also useful as a sanity check. Unit tests usually will have only one field annotated with @undertest.

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