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

Use JUnit @Rule instead of (as well as) ClientDriverUnitTest #22

Closed
mjg123 opened this issue Apr 28, 2011 · 4 comments
Closed

Use JUnit @Rule instead of (as well as) ClientDriverUnitTest #22

mjg123 opened this issue Apr 28, 2011 · 4 comments
Assignees
Labels
Milestone

Comments

@mjg123
Copy link
Member

mjg123 commented Apr 28, 2011

Is this possible?

@neilprosser
Copy link
Member

@mjg123 - take a look at that first attempt and let me know what you think.

c52387d#diff-1 has examples of success and failure as actual JUnit tests.

@mjg123
Copy link
Member Author

mjg123 commented May 9, 2011

I know it's closed now, but I'm using this for the first time. I feel that if .expect() is correct for the rule then .expect should be the method on the clientdriver as well (currently is .addExpectation() )

@neilprosser
Copy link
Member

I wanted to be careful not to confuse with a method name that potentially indicates overwriting the expectation. ExpectedException can only expect one exception. Expecting one over the top of another expects the last one.

@neilprosser
Copy link
Member

Have now corrected the method name to what I said it was rather than what it actually was!

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

2 participants