AssertJBigIntegerRules
SUGGESTION
Simplification
Suppression
Disable all rules by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$).*as compiler argument.
Table of contents
AbstractBigIntegerAssertIsEqualTo
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsEqualTo")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsEqualTo).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsEqualTo() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isCloseTo(BigInteger.ONE, offset(BigInteger.ZERO)),
- assertThat(BigInteger.ONE).isCloseTo(BigInteger.TWO, withPercentage(0)));
+ assertThat(BigInteger.ZERO).isEqualTo(BigInteger.ONE),
+ assertThat(BigInteger.ONE).isEqualTo(BigInteger.TWO));
}AbstractBigIntegerAssertIsNotEqualTo
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsNotEqualTo")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsNotEqualTo).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsNotEqualTo() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isNotCloseTo(BigInteger.ONE, offset(BigInteger.ZERO)),
- assertThat(BigInteger.ONE).isNotCloseTo(BigInteger.TWO, withPercentage(0)));
+ assertThat(BigInteger.ZERO).isNotEqualTo(BigInteger.ONE),
+ assertThat(BigInteger.ONE).isNotEqualTo(BigInteger.TWO));
}AbstractBigIntegerAssertIsEqualToZero
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsEqualToZero")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsEqualToZero).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsEqualToZero() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isZero(),
- assertThat(BigInteger.ONE).isEqualTo(0L),
- assertThat(BigInteger.TWO).isEqualTo(BigInteger.ZERO));
+ assertThat(BigInteger.ZERO).isEqualTo(0),
+ assertThat(BigInteger.ONE).isEqualTo(0),
+ assertThat(BigInteger.TWO).isEqualTo(0));
}AbstractBigIntegerAssertIsNotEqualToZero
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsNotEqualToZero")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsNotEqualToZero).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsNotEqualToZero() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isNotZero(),
- assertThat(BigInteger.ONE).isNotEqualTo(0L),
- assertThat(BigInteger.TWO).isNotEqualTo(BigInteger.ZERO));
+ assertThat(BigInteger.ZERO).isNotEqualTo(0),
+ assertThat(BigInteger.ONE).isNotEqualTo(0),
+ assertThat(BigInteger.TWO).isNotEqualTo(0));
}AbstractBigIntegerAssertIsEqualToOne
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsEqualToOne")to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsEqualToOne).*as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsEqualToOne() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isOne(),
- assertThat(BigInteger.ONE).isEqualTo(1L),
- assertThat(BigInteger.TWO).isEqualTo(BigInteger.ONE));
+ assertThat(BigInteger.ZERO).isEqualTo(1),
+ assertThat(BigInteger.ONE).isEqualTo(1),
+ assertThat(BigInteger.TWO).isEqualTo(1));
}