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

Document that assertThrows allows exception subtypes #3729

Merged

Conversation

Marcono1234
Copy link
Contributor

@Marcono1234 Marcono1234 commented Mar 15, 2024

Overview

Currently the assertThrows documentation does not mention that exception subtypes will cause the assertion to succeed as well. This caused some confusion for #2505 (and lead to the introduction of assertThrowsExactly).


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@marcphilipp marcphilipp added this to the 5.11 M2 milestone May 2, 2024
@marcphilipp marcphilipp merged commit 5870c3b into junit-team:main May 2, 2024
14 checks passed
@marcphilipp
Copy link
Member

@Marcono1234 Thank you for your contribution!

@Marcono1234 Marcono1234 deleted the assertThrows-doc-exception-subtypes branch May 2, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants