Class AssertionsOnValueCloseness
java.lang.Object
org.assertj.db.api.assertions.impl.AssertionsOnValueCloseness
Implements the assertion methods on the closeness of a value.
- Author:
- Régis Pouiller
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, Number expected, Number tolerance) Verifies that the value is close to a number.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateTimeValue expected, DateTimeValue tolerance) Verifies that the value is close to a date/time.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateTimeValue expected, DateValue tolerance) Verifies that the value is close to a date/time.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateTimeValue expected, TimeValue tolerance) Verifies that the value is close to a date/time.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateValue expected, DateTimeValue tolerance) Verifies that the value is close to a date.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateValue expected, DateValue tolerance) Verifies that the value is close to a date.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateValue expected, TimeValue tolerance) Verifies that the value is close to a date.static <A extends AbstractAssert<?>>
AisCloseTo
(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, TimeValue expected, TimeValue tolerance) Verifies that the value is close to a time.
-
Method Details
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, Number expected, Number tolerance) Verifies that the value is close to a number.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected number value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the number in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateValue expected, DateValue tolerance) Verifies that the value is close to a date.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected date value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateValue expected, TimeValue tolerance) Verifies that the value is close to a date.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected date value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateValue expected, DateTimeValue tolerance) Verifies that the value is close to a date.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected date value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, TimeValue expected, TimeValue tolerance) Verifies that the value is close to a time.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected time value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateTimeValue expected, DateValue tolerance) Verifies that the value is close to a date/time.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected date/time value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateTimeValue expected, TimeValue tolerance) Verifies that the value is close to a date/time.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected date/time value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-
isCloseTo
public static <A extends AbstractAssert<?>> A isCloseTo(A assertion, org.assertj.core.api.WritableAssertionInfo info, Value value, DateTimeValue expected, DateTimeValue tolerance) Verifies that the value is close to a date/time.- Type Parameters:
A
- The type of the assertion which call this method.- Parameters:
assertion
- The assertion which call this method.info
- Writable information about an assertion.value
- The value.expected
- The expected date/time value.tolerance
- The tolerance of the closeness.- Returns:
this
assertion object.- Throws:
AssertionError
- If the value is not equal to the date in parameter.
-