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 for JUnit5 Assumptions #1465

Closed
j8zdev opened this issue Nov 30, 2023 · 3 comments · Fixed by #1477
Closed

Support for JUnit5 Assumptions #1465

j8zdev opened this issue Nov 30, 2023 · 3 comments · Fixed by #1477

Comments

@j8zdev
Copy link

j8zdev commented Nov 30, 2023

JGiven currently supports assumptions from JUnit4 (org.junit.AssumptionViolatedException) and TestNG (org.testng.SkipException).

However, JUnit5's assumptions throw an org.opentest4j.TestAbortedException, which currently results in a failed test but should be handled in the same manner as the other supported exceptions.

@l-1squared
Copy link
Collaborator

You are probably right in that regard.
Could you help me out and provide an example test, or maybe even propose a fix?

@l-1squared l-1squared self-assigned this Dec 6, 2023
@j8zdev
Copy link
Author

j8zdev commented Dec 7, 2023

@l-1squared: As far as I see, org.opentest4j.TestAbortedException needs to be added here: https://github.com/TNG/JGiven/blob/master/jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/ThrowableUtil.java

@l-1squared
Copy link
Collaborator

@j8zdev Many Thanks for the analysis! Made my life easier

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

Successfully merging a pull request may close this issue.

2 participants