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

Simple try-catch assertion migrations #8

Open
slinkydeveloper opened this issue Mar 22, 2022 · 0 comments
Open

Simple try-catch assertion migrations #8

slinkydeveloper opened this issue Mar 22, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@slinkydeveloper
Copy link
Collaborator

It should be feasible to match simple try-catch assertions like:

try {
  [codeblock]
  fail("this message doesn't really matter")
} catch(SomeException e) {
  // Some assert on the exception
}

This can be converted to:

assertThatThrownBy(() -> {
  [codeblock]
}).isInstanceOf(SomeException.class) // Chain other assertions
@slinkydeveloper slinkydeveloper added the enhancement New feature or request label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant