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

HamcrestMatcherToAssertJ does not support matchers from "org.hamcrest.core.*" #519

Closed
Saturas89 opened this issue Jun 4, 2024 · 1 comment · Fixed by #523
Closed

HamcrestMatcherToAssertJ does not support matchers from "org.hamcrest.core.*" #519

Saturas89 opened this issue Jun 4, 2024 · 1 comment · Fixed by #523
Assignees
Labels
bug Something isn't working

Comments

@Saturas89
Copy link

What version of OpenRewrite are you using?

I am using

  • Maven plugin v5.32.1
  • rewrite-testing-frameworks v2.10.1

How are you running OpenRewrite?

I am using the Maven plugin, and my project is a single module project.

<plugin>
  <groupId>org.openrewrite.maven</groupId>
  <artifactId>rewrite-maven-plugin</artifactId>
  <version>5.32.1</version>
  <configuration>
    <activeRecipes>                                                    <recipe>org.openrewrite.java.testing.hamcrest.HamcrestMatcherToAssertJ</recipe>
    </activeRecipes>
  </configuration>
</plugin>

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

Using the hamcrest matchers from the core package.

import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.core.IsNot.not;
import static org.hamcrest.core.IsSame.sameInstance;

What did you expect to see?

That the matchers are replaced with the assertJ assertions.

@Saturas89 Saturas89 added the bug Something isn't working label Jun 4, 2024
timtebeek added a commit that referenced this issue Jun 13, 2024
@timtebeek
Copy link
Contributor

Thanks for bringing this to our attention @Saturas89 ! Should be fixed with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants