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.ZERO).isCloseTo(BigInteger.ONE, withPercentage(0)));
+ assertThat(BigInteger.ZERO).isEqualTo(BigInteger.ONE),
+ assertThat(BigInteger.ZERO).isEqualTo(BigInteger.ONE));
}
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.ZERO).isNotCloseTo(BigInteger.ONE, withPercentage(0)));
+ assertThat(BigInteger.ZERO).isNotEqualTo(BigInteger.ONE),
+ assertThat(BigInteger.ZERO).isNotEqualTo(BigInteger.ONE));
}
AbstractBigIntegerAssertIsZero
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsZero")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsZero).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsZero() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isZero(),
- assertThat(BigInteger.ZERO).isEqualTo(0L),
- assertThat(BigInteger.ZERO).isEqualTo(BigInteger.ZERO));
+ assertThat(BigInteger.ZERO).isEqualTo(0),
+ assertThat(BigInteger.ZERO).isEqualTo(0),
+ assertThat(BigInteger.ZERO).isEqualTo(0));
}
AbstractBigIntegerAssertIsNotZero
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsNotZero")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsNotZero).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsNotZero() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isNotZero(),
- assertThat(BigInteger.ZERO).isNotEqualTo(0L),
- assertThat(BigInteger.ZERO).isNotEqualTo(BigInteger.ZERO));
+ assertThat(BigInteger.ZERO).isNotEqualTo(0),
+ assertThat(BigInteger.ZERO).isNotEqualTo(0),
+ assertThat(BigInteger.ZERO).isNotEqualTo(0));
}
AbstractBigIntegerAssertIsOne
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AbstractBigIntegerAssertIsOne")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!AssertJBigIntegerRules\$AbstractBigIntegerAssertIsOne).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableSet<AbstractBigIntegerAssert<?>> testAbstractBigIntegerAssertIsOne() {
return ImmutableSet.of(
- assertThat(BigInteger.ZERO).isOne(),
- assertThat(BigInteger.ZERO).isEqualTo(1L),
- assertThat(BigInteger.ZERO).isEqualTo(BigInteger.ONE));
+ assertThat(BigInteger.ZERO).isEqualTo(1),
+ assertThat(BigInteger.ZERO).isEqualTo(1),
+ assertThat(BigInteger.ZERO).isEqualTo(1));
}