Package org.assertj.core.error
Class ShouldNotBeEqualWithinPercentage
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldNotBeEqualWithinPercentage
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that an assertion that
verifies that two numbers are not equal within a positive percentage failed.
- Author:
- Chris Arnott
-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Number>
ErrorMessageFactoryshouldNotBeEqualWithinPercentage
(T actual, T expected, Percentage percentage, T difference) Creates a new
.ShouldNotBeEqualWithinPercentage
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Method Details
-
shouldNotBeEqualWithinPercentage
public static <T extends Number> ErrorMessageFactory shouldNotBeEqualWithinPercentage(T actual, T expected, Percentage percentage, T difference) Creates a new
.ShouldNotBeEqualWithinPercentage
- Type Parameters:
T
- the type of the actual value and the type of values that givenCondition
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
.
-