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 @Test capabilities (expected Exception) #2

Open
piotrturski opened this issue Jan 5, 2015 · 2 comments
Open

Support @Test capabilities (expected Exception) #2

piotrturski opened this issue Jan 5, 2015 · 2 comments

Comments

@piotrturski
Copy link
Owner

From [email protected] on July 15, 2013 23:21:41

1.0.0-beta1

The usage is really neat but I was hoping the following would succeed
@test(expected=Exception.class)
@testwith({"A B", "A+B", "A!B"})
public void junkNameFails(String junkName) { ...
It doesn't and there is no equivalent so I'm back to try-catch-or-fail()
Same could be said for the timeout option though I suspect it's less commonly used.

Without looking at the code or possibilities in JUnit, it would be preferable to hijack an existing @test annotation (as above) than to simply repeat its functions. That way @testwith stays pure to parameterisation.

Original issue: http://code.google.com/p/zohhak/issues/detail?id=2

@piotrturski
Copy link
Owner Author

From [email protected] on September 29, 2013 16:55:55

i didn't plan to support this feature because there is a lot of arguing that it shouldn't be used.
see: http://alexruiz.developerblogs.com/?p=1530 and https://code.google.com/p/catch-exception/ however, there are some small problems with catch-exception library so i will reconsider this feature. but i don't think it will be added very soon

@piotrturski
Copy link
Owner Author

From [email protected] on September 29, 2013 17:05:47

Labels: -Type-Defect Type-Enhancement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant