Package | Description |
---|---|
org.assertj.core.api | |
org.assertj.core.data | |
org.assertj.core.error | |
org.assertj.core.internal |
Modifier and Type | Method and Description |
---|---|
static Offset<java.lang.Double> |
Assertions.offset(java.lang.Double value)
Assertions entry point for double
Offset . |
static Offset<java.lang.Float> |
Assertions.offset(java.lang.Float value)
Assertions entry point for float
Offset . |
static Offset<java.math.BigDecimal> |
Assertions.within(java.math.BigDecimal value)
Assertions entry point for BigDecimal
Offset to use with isCloseTo assertions. |
static Offset<java.lang.Byte> |
Assertions.within(java.lang.Byte value)
Assertions entry point for Byte
Offset to use with isCloseTo assertions. |
static Offset<java.lang.Double> |
Assertions.within(java.lang.Double value)
Alias for
Assertions.offset(Double) to use with isCloseTo assertions. |
static Offset<java.lang.Float> |
Assertions.within(java.lang.Float value)
Alias for
Assertions.offset(Float) to use with isCloseTo assertions. |
static Offset<java.lang.Integer> |
Assertions.within(java.lang.Integer value)
Assertions entry point for Integer
Offset to use with isCloseTo assertions. |
static Offset<java.lang.Long> |
Assertions.within(java.lang.Long value)
Assertions entry point for Long
Offset to use with isCloseTo assertions. |
static Offset<java.lang.Short> |
Assertions.within(java.lang.Short value)
Assertions entry point for Short
Offset to use with isCloseTo assertions. |
Modifier and Type | Method and Description |
---|---|
S |
FloatingPointNumberAssert.isCloseTo(A expected,
Offset<A> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
NumberAssert.isCloseTo(A expected,
Offset<A> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractBigDecimalAssert.isCloseTo(java.math.BigDecimal other,
Offset<java.math.BigDecimal> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractByteAssert.isCloseTo(byte expected,
Offset<java.lang.Byte> offset)
Verifies that the actual byte is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractByteAssert.isCloseTo(java.lang.Byte expected,
Offset<java.lang.Byte> offset)
Verifies that the actual Byte is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractDoubleAssert.isCloseTo(double other,
Offset<java.lang.Double> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractDoubleAssert.isCloseTo(java.lang.Double other,
Offset<java.lang.Double> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractFloatAssert.isCloseTo(float other,
Offset<java.lang.Float> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractFloatAssert.isCloseTo(java.lang.Float other,
Offset<java.lang.Float> offset)
Verifies that the actual number is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractIntegerAssert.isCloseTo(java.lang.Integer expected,
Offset<java.lang.Integer> offset)
Verifies that the actual int is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractIntegerAssert.isCloseTo(int expected,
Offset<java.lang.Integer> offset)
Verifies that the actual int is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractLongAssert.isCloseTo(long expected,
Offset<java.lang.Long> offset)
Verifies that the actual long is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractLongAssert.isCloseTo(java.lang.Long expected,
Offset<java.lang.Long> offset)
Verifies that the actual long is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractShortAssert.isCloseTo(short expected,
Offset<java.lang.Short> offset)
Verifies that the actual short is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractShortAssert.isCloseTo(java.lang.Short expected,
Offset<java.lang.Short> offset)
Verifies that the actual short is close to the given one within the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
FloatingPointNumberAssert.isEqualTo(A expected,
Offset<A> offset)
Verifies that the actual value is close to the given one by less than the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractDoubleAssert.isEqualTo(double expected,
Offset<java.lang.Double> offset)
Verifies that the actual value is close to the given one by less than the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractDoubleAssert.isEqualTo(java.lang.Double expected,
Offset<java.lang.Double> offset)
Verifies that the actual value is close to the given one by less than the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractFloatAssert.isEqualTo(float expected,
Offset<java.lang.Float> offset)
Verifies that the actual value is close to the given one by less than the given offset.
If difference is equal to offset value, assertion is considered valid. |
S |
AbstractFloatAssert.isEqualTo(java.lang.Float expected,
Offset<java.lang.Float> offset)
Verifies that the actual value is close to the given one by less than the given offset.
If difference is equal to offset value, assertion is considered valid. |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
Offset.offset(T value)
Creates a new
Offset . |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
ShouldBeEqualWithinOffset.shouldBeEqual(T actual,
T expected,
Offset<T> offset,
T difference)
Creates a new
. |
Constructor and Description |
---|
ShouldBeEqualWithinOffset(java.lang.Number actual,
java.lang.Number expected,
Offset<T> offset,
java.lang.Number difference) |
Modifier and Type | Method and Description |
---|---|
private Offset<java.lang.Double> |
Numbers.computeOffset(NUMBER referenceValue,
Percentage percentage) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
BigDecimals.areNotCloseEnough(java.math.BigDecimal actual,
java.math.BigDecimal other,
Offset<java.math.BigDecimal> offset) |
void |
Doubles.assertEqual(AssertionInfo info,
java.lang.Double actual,
java.lang.Double expected,
Offset<java.lang.Double> offset)
Verifies that two floats are equal within a positive offset.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |
void |
Floats.assertEqual(AssertionInfo info,
java.lang.Float actual,
java.lang.Float expected,
Offset<java.lang.Float> offset)
Verifies that two floats are equal within a positive offset.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |
void |
BigDecimals.assertIsCloseTo(AssertionInfo info,
java.math.BigDecimal actual,
java.math.BigDecimal other,
Offset<java.math.BigDecimal> offset) |
void |
Bytes.assertIsCloseTo(AssertionInfo info,
java.lang.Byte actual,
java.lang.Byte expected,
Offset<java.lang.Byte> offset) |
void |
Doubles.assertIsCloseTo(AssertionInfo info,
java.lang.Double actual,
java.lang.Double other,
Offset<java.lang.Double> offset) |
void |
Floats.assertIsCloseTo(AssertionInfo info,
java.lang.Float actual,
java.lang.Float expected,
Offset<java.lang.Float> offset) |
void |
Integers.assertIsCloseTo(AssertionInfo info,
java.lang.Integer actual,
java.lang.Integer expected,
Offset<java.lang.Integer> offset) |
void |
Longs.assertIsCloseTo(AssertionInfo info,
java.lang.Long actual,
java.lang.Long expected,
Offset<java.lang.Long> offset) |
abstract void |
Numbers.assertIsCloseTo(AssertionInfo info,
NUMBER actual,
NUMBER other,
Offset<NUMBER> offset)
Asserts that the actual value is close to the offset.
|
void |
Shorts.assertIsCloseTo(AssertionInfo info,
java.lang.Short actual,
java.lang.Short expected,
Offset<java.lang.Short> offset) |
(package private) static void |
CommonValidations.checkOffsetIsNotNull(Offset<?> offset) |
protected boolean |
Doubles.isEqualTo(java.lang.Double actual,
java.lang.Double expected,
Offset<?> offset) |
protected boolean |
Floats.isEqualTo(java.lang.Float actual,
java.lang.Float expected,
Offset<?> offset) |
protected abstract boolean |
RealNumbers.isEqualTo(NUMBER actual,
NUMBER expected,
Offset<?> offset)
Returns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |