Skip to content

Simple try-catch assertion migrations #8

@slinkydeveloper

Description

@slinkydeveloper

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions