Class ShouldNotBeEqualWithinOffset

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldNotBeEqualWithinOffset
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that two numbers are not equal within a positive offset failed.
    Author:
    Chris Arnott
    • Constructor Detail

      • ShouldNotBeEqualWithinOffset

        private ShouldNotBeEqualWithinOffset​(Number actual,
                                             Number expected,
                                             Offset<T> offset,
                                             Number difference)
    • Method Detail

      • shouldNotBeEqual

        public static <T extends NumberErrorMessageFactory shouldNotBeEqual​(T actual,
                                                                              T expected,
                                                                              Offset<T> offset,
                                                                              T difference)
        Type Parameters:
        T - guarantees that the values used in this factory have the same type.
        Parameters:
        actual - the actual value in the failed assertion.
        expected - the expected value in the failed assertion.
        offset - the given positive offset.
        difference - the effective difference between actual and expected.
        Returns:
        the created ErrorMessageFactory.