Skip to content

isGreaterThanOrEqualTo for java.util.Date by HamcrestMatcherToAssertJ should result isAfterOrEqualTo  #526

@ssheikin

Description

@ssheikin

What version of OpenRewrite are you using?

I am using

  • Maven/Gradle plugin 5.32.0
  • rewrite-testing-frameworks 2.10.1

How are you running OpenRewrite?

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

            <plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <version>5.32.0</version>
                <configuration>
                    <activeRecipes>
                        <recipe>org.openrewrite.java.testing.hamcrest.MigrateHamcrestToAssertJ</recipe>
                    </activeRecipes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-testing-frameworks</artifactId>
                        <version>2.10.1</version>
                    </dependency>
                </dependencies>
            </plugin>

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

java.sql.Timestamp actualDate;
assertThat(actualDate, greaterThanOrEqualTo(expectedDate));

What did you expect to see?

assertThat(actualDate).isAfterOrEqualTo(expectedDate);

What did you see instead?

assertThat(actualDate).isGreaterThanOrEqualTo(expectedDate);

What is the full stack trace of any errors you encountered?

[ERROR] cannot find symbol
[ERROR]   symbol:   method isGreaterThanOrEqualTo(java.sql.Timestamp)
[ERROR]   location: class org.assertj.core.api.AbstractDateAssert<capture#1 of ?>

Are you interested in contributing a fix to OpenRewrite?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomersrecipeRecipe request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions