Back to Error Prone

TruthConstantAsserts

docs/bugpattern/TruthConstantAsserts.md

2.49.0192 B
Original Source

The arguments to assertThat method is a constant. It should be a variable or a method invocation. For eg. switch assertThat(1).isEqualTo(methodCall()) to assertThat(methodCall()).isEqualTo(1).