Class BigDecimalSubject

    • Method Detail

      • isEqualToIgnoringScale

        public void isEqualToIgnoringScale​(BigDecimal expected)
        Fails if the subject's value is not equal to the value of the given BigDecimal. (i.e., fails if actual.comparesTo(expected) != 0).

        Note: The scale of the BigDecimal is ignored. If you want to compare the values and the scales, use isEqualTo(Object).

      • isEqualToIgnoringScale

        public void isEqualToIgnoringScale​(String expected)
        Fails if the subject's value is not equal to the value of the BigDecimal created from the expected string (i.e., fails if actual.comparesTo(new BigDecimal(expected)) != 0).

        Note: The scale of the BigDecimal is ignored. If you want to compare the values and the scales, use isEqualTo(Object).

      • isEqualToIgnoringScale

        public void isEqualToIgnoringScale​(long expected)
        Fails if the subject's value is not equal to the value of the BigDecimal created from the expected long (i.e., fails if actual.comparesTo(new BigDecimal(expected)) != 0).

        Note: The scale of the BigDecimal is ignored. If you want to compare the values and the scales, use isEqualTo(Object).