Skip to content

AssertJ Refaster rules for Iterator#hasNext() #1088

@knutwannheden

Description

@knutwannheden

Running the JUnitToAssertJRules across some code I noticed that AssertThatIsTrue and AssertThatIsFalse transformed some JUnit assertTrue() and assertFalse() calls:

image

It seems like it would be a nice addition to have specific rules calling AbstractIteratorAssert#hasNext() and AbstractIteratorAssert#isExhausted() instead.

The example was found in hibernate/hibernate-tools: https://github.com/hibernate/hibernate-tools/blob/10431fc27866d295be9d2062ffdc9b1cd9099c16/jbt/src/test/java/org/hibernate/tool/orm/jbt/util/NativeConfigurationTest.java#L242-L247

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions