Class ShouldNotBeEqualWithinPercentage

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldNotBeEqualWithinPercentage
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that two numbers are not equal within a positive percentage failed.
    • Constructor Detail

      • ShouldNotBeEqualWithinPercentage

        private ShouldNotBeEqualWithinPercentage​(java.lang.Number actual,
                                                 java.lang.Number expected,
                                                 Percentage percentage,
                                                 double expectedPercentage)
    • Method Detail

      • shouldNotBeEqualWithinPercentage

        public static <T extends java.lang.Number> ErrorMessageFactory shouldNotBeEqualWithinPercentage​(T actual,
                                                                                                        T expected,
                                                                                                        Percentage percentage,
                                                                                                        T difference)
        Type Parameters:
        T - the type of the actual value and the type of values that given Condition takes.
        Parameters:
        actual - the actual value in the failed assertion.
        expected - the expected value in the failed assertion.
        percentage - the given positive percentage.
        difference - the effective difference between actual and expected.
        Returns:
        the created ErrorMessageFactory.