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

shouldThrow should use exception class hierarchy instead of exact class #7

Closed
neyb opened this issue Nov 14, 2016 · 2 comments
Closed

Comments

@neyb
Copy link

neyb commented Nov 14, 2016

{ throw IllegalStateException() } shouldThrow RuntimeException::class should pass

@MarkusAmshove
Copy link
Owner

(for the record)
I've tested what JUnits behavior would be in this case.

This test passes:
@Test(expected = RuntimeException.class) public void test() { new ArrayList<>().get(0); }

So the Exceptionhierarchy is expected behavior

@MarkusAmshove
Copy link
Owner

I merged your PR into master and released both changes into 1.9.

Thanks for your contribution!

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

2 participants