Package org.assertj.core.error
Class ShouldBeEqualWithinOffset
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.error.ShouldBeEqualWithinOffset
-
- All Implemented Interfaces:
ErrorMessageFactory
public class ShouldBeEqualWithinOffset extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that two numbers are equal within a positive offset failed.
-
-
Field Summary
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ShouldBeEqualWithinOffset(java.lang.Number actual, java.lang.Number expected, Offset<T> offset, java.lang.Number difference)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends java.lang.Number>
ErrorMessageFactoryshouldBeEqual(T actual, T expected, Offset<T> offset, T difference)
Creates a new
.ShouldBeEqualWithinOffset
-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Constructor Detail
-
ShouldBeEqualWithinOffset
private ShouldBeEqualWithinOffset(java.lang.Number actual, java.lang.Number expected, Offset<T> offset, java.lang.Number difference)
-
-
Method Detail
-
shouldBeEqual
public static <T extends java.lang.Number> ErrorMessageFactory shouldBeEqual(T actual, T expected, Offset<T> offset, T difference)
Creates a new
.ShouldBeEqualWithinOffset
- 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
.
-
-