assertThat(anOptional.isPresent()).isTrue()
should be converted to assertThat(anOptional).isPresent()
#466
Labels
recipe
Recipe request
What problem are you trying to solve?
In my codebase I have almost every combination of:
assertThat(anOptional.isEmpty()).isFalse()
assertThat(anOptional.isEmpty()).isTrue()
assertThat(anOptional.isPresent()).isFalse()
assertThat(anOptional.isPresent()).isTrue()
Describe the solution you'd like
They should be converted to
assertThat(anOptional).isPresent()
andassertThat(anOptional).isEmpty()
.Have you considered any alternatives or workarounds?
Additional context
Are you interested in contributing this feature to OpenRewrite?
no
The text was updated successfully, but these errors were encountered: