Class BigDecimalAssert

    • Constructor Detail

      • BigDecimalAssert

        protected BigDecimalAssert​(java.math.BigDecimal actual)
    • Method Detail

      • isZero

        public BigDecimalAssert isZero()
        Verifies that the actual value is equal to zero.
        Specified by:
        isZero in interface NumberAssert<java.math.BigDecimal>
        Returns:
        this assertion object.
      • isNotZero

        public BigDecimalAssert isNotZero()
        Verifies that the actual value is not equal to zero.
        Specified by:
        isNotZero in interface NumberAssert<java.math.BigDecimal>
        Returns:
        this assertion object.
      • isPositive

        public BigDecimalAssert isPositive()
        Verifies that the actual value is positive.
        Specified by:
        isPositive in interface NumberAssert<java.math.BigDecimal>
        Returns:
        this assertion object.
      • isNegative

        public BigDecimalAssert isNegative()
        Verifies that the actual value is negative.
        Specified by:
        isNegative in interface NumberAssert<java.math.BigDecimal>
        Returns:
        this assertion object.
      • isNotPositive

        public BigDecimalAssert isNotPositive()
        Verifies that the actual value is non positive (negative or equal zero).
        Specified by:
        isNotPositive in interface NumberAssert<java.math.BigDecimal>
        Returns:
        this assertion object.
      • isNotNegative

        public BigDecimalAssert isNotNegative()
        Verifies that the actual value is non negative (positive or equal zero).
        Specified by:
        isNotNegative in interface NumberAssert<java.math.BigDecimal>
        Returns:
        this assertion object.
      • usingComparator

        public BigDecimalAssert usingComparator​(java.util.Comparator<? super java.math.BigDecimal> customComparator)
        Description copied from class: AbstractAssert
        Use given custom comparator instead of relying on actual type A equals method for incoming assertion checks.

        Custom comparator is bound to assertion instance, meaning that if a new assertion is created, it will use default comparison strategy.

        Examples :

         // frodo and sam are instances of Character with Hobbit race (obviously :).
         // raceComparator implements Comparator<Character> 
         assertThat(frodo).usingComparator(raceComparator).isEqualTo(sam); 
         
        Specified by:
        usingComparator in interface Assert<BigDecimalAssert,​java.math.BigDecimal>
        Overrides:
        usingComparator in class AbstractComparableAssert<BigDecimalAssert,​java.math.BigDecimal>
        Parameters:
        customComparator - the comparator to use for incoming assertion checks.
        Returns:
        this assertion object.