Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldBeEqualWithinOffset

extends BasicErrorMessageFactory
Class Inheritance
Imports
org.assertj.core.data.Offset

Creates an error message indicating that an assertion that verifies that two numbers are equal within a positive offset failed.
Authors
Alex Ruiz, Joel Costigliola

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private <T extends Number>
ShouldBeEqualWithinOffset(Number actual, Number expected, Offset<T> offset, Number difference)

Method Summary

Modifier and TypeMethod and Description
public static <
guarantees that the values used in this factory have the same type.
T extends Number
>
ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeEqual
(T
the actual value in the failed assertion.
actual
,
T
the expected value in the failed assertion.
expected
,
Offset<T>
the given positive offset.
offset
,
T
the effective difference between actual and expected.
difference
)

Creates a new ShouldBeEqualWithinOffset.

private static <T extends Number> String
validOrNot(Offset<T> offset)

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldBeEqualWithinOffsetback to summary
private <T extends Number> ShouldBeEqualWithinOffset(Number actual, Number expected, Offset<T> offset, Number difference)

Method Detail

shouldBeEqualback to summary
public static <T extends Number> ErrorMessageFactory shouldBeEqual(T actual, T expected, Offset<T> offset, T difference)

Creates a new ShouldBeEqualWithinOffset.

Parameters
<T>
guarantees that the values used in this factory have the same type.
actual:T

the actual value in the failed assertion.

expected:T

the expected value in the failed assertion.

offset:Offset<T>

the given positive offset.

difference:T

the effective difference between actual and expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

validOrNotback to summary
private static <T extends Number> String validOrNot(Offset<T> offset)