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

assertInstanceOf not converted from JUnit5 to assertJ #606

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

timo-abele
Copy link
Contributor

@timo-abele timo-abele commented Sep 21, 2024

What's changed?

What's your motivation?

Reproducing an observed conversion miss.

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

I'm not sure with sub recipe should convert this so I am using the best practices recipe as a catch-all.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • src/main/java/org/openrewrite/java/testing/junit5/EnclosedToNested.java
    • lines 24-25

@timtebeek timtebeek added good first issue Good for newcomers recipe Recipe request labels Oct 21, 2024
@timtebeek timtebeek changed the title Demo: instanceof not converted from JUnit5 to assertJ assertInstanceOf not converted from JUnit5 to assertJ Oct 21, 2024
@timtebeek
Copy link
Contributor

Thanks for the suggestion! This likely needs a dedicated recipe, similar to the other examples seen here:

- org.openrewrite.java.testing.assertj.JUnitAssertArrayEqualsToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertEqualsToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertFalseToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertNotEqualsToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertNotNullToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertNullToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertSameToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertTrueToAssertThat
- org.openrewrite.java.testing.assertj.JUnitFailToAssertJFail
- org.openrewrite.java.testing.assertj.JUnitAssertThrowsToAssertExceptionType

Anyone welcome to fill in the missing piece here to make it a reality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers recipe Recipe request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants