Skip to content

Test method does not declare throwing an exception after removing the expected #754

@henri-tremblay

Description

@henri-tremblay

I am using

  • Maven/Gradle plugin v6.11.0
  • rewrite-testing-frameworks v3.10.0

How are you running OpenRewrite?

Classic maven call

What is the smallest, simplest way to reproduce the problem?

I have the following test:

    @Test(expected = SomeException.class)
    public void testSomething() throws Exception { }

It gets transformed to

    @Test
    void execute_db_down() {}

The throws is removed which causes a compilation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions