notToEqualIncludingScale

Expects that the subject of this expectation (a BigDecimal) is not equal to expected including BigDecimal.scale.

Most of the time you want to use notToEqualNumerically which does not compare BigDecimal.scale in contrast to this function. Following the two functions compared:

  • expect(BigDecimal("10")).notToEqualIncludingScale(BigDecimal("10.0")) holds.

  • expect(BigDecimal("10")).notToEqualNumerically(BigDecimal("10.0")) does not hold.

Return

an Expect for the subject of this expectation.

Since

0.17.0

Samples

// Use notToEqualIncludingScale to compare subject and target are not numerically and scaling equal
expect(BigDecimal("-12345.67890")) notToEqualIncludingScale BigDecimal("-12345.6789")

fails{
    expect(BigDecimal("-12345.678912", MathContext(9))) notToEqualIncludingScale BigDecimal("-12345.6789")
}