Package  Description 

org.assertj.core.api  
org.assertj.core.data  
org.assertj.core.error  
org.assertj.core.internal 
Modifier and Type  Method and Description 

default Percentage 
WithAssertions.withinPercentage(Double value)
Assertions entry point for Double
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
Assertions.withinPercentage(Double value)
Assertions entry point for Double
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
AssertionsForClassTypes.withinPercentage(Double value)
Assertions entry point for Double
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
Java6Assertions.withinPercentage(Double value)
Assertions entry point for Double
Percentage to use with isCloseTo assertions for
percentages. 
default Percentage 
WithAssertions.withinPercentage(Integer value)
Assertions entry point for Integer
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
Assertions.withinPercentage(Integer value)
Assertions entry point for Integer
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
AssertionsForClassTypes.withinPercentage(Integer value)
Assertions entry point for Integer
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
Java6Assertions.withinPercentage(Integer value)
Assertions entry point for Integer
Percentage to use with isCloseTo assertions for
percentages. 
default Percentage 
WithAssertions.withinPercentage(Long value)
Assertions entry point for Long
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
Assertions.withinPercentage(Long value)
Assertions entry point for Long
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
AssertionsForClassTypes.withinPercentage(Long value)
Assertions entry point for Long
Percentage to use with isCloseTo assertions for
percentages. 
static Percentage 
Java6Assertions.withinPercentage(Long value)
Assertions entry point for Long
Percentage to use with isCloseTo assertions for
percentages. 
Modifier and Type  Method and Description 

AtomicIntegerAssert 
AtomicIntegerAssert.hasValueCloseTo(int expected,
Percentage percentage)
Verifies that the actual atomic has a value close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
AtomicLongAssert 
AtomicLongAssert.hasValueCloseTo(long expected,
Percentage percentage)
Verifies that the actual atomic has a value close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
NumberAssert.isCloseTo(ACTUAL expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractBigDecimalAssert.isCloseTo(BigDecimal expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractBigIntegerAssert.isCloseTo(BigInteger expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractByteAssert.isCloseTo(byte expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractByteAssert.isCloseTo(Byte expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractDoubleAssert.isCloseTo(double expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractDoubleAssert.isCloseTo(Double expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractFloatAssert.isCloseTo(float expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractFloatAssert.isCloseTo(Float expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractIntegerAssert.isCloseTo(Integer expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractIntegerAssert.isCloseTo(int expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractLongAssert.isCloseTo(long expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractLongAssert.isCloseTo(Long expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractShortAssert.isCloseTo(short expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
AbstractShortAssert.isCloseTo(Short expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, assertion is considered valid. 
SELF 
NumberAssert.isNotCloseTo(ACTUAL expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractBigDecimalAssert.isNotCloseTo(BigDecimal expected,
Percentage percentage)
Verifies that the actual number is not close to the given one by the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractBigIntegerAssert.isNotCloseTo(BigInteger expected,
Percentage percentage)
Verifies that the actual number is not close to the given one by the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractByteAssert.isNotCloseTo(byte expected,
Percentage percentage)
Verifies that the actual number is not close to the given one by the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractByteAssert.isNotCloseTo(Byte expected,
Percentage percentage)
Verifies that the actual number is not close to the given one b the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractDoubleAssert.isNotCloseTo(double expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractDoubleAssert.isNotCloseTo(Double expected,
Percentage percentage)
Verifies that the actual number is close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractFloatAssert.isNotCloseTo(float expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractFloatAssert.isNotCloseTo(Float expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractIntegerAssert.isNotCloseTo(Integer expected,
Percentage percentage)
Verifies that the actual number is not close to the given one by the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractIntegerAssert.isNotCloseTo(int expected,
Percentage percentage)
Verifies that the actual number is not close to the given one by the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractLongAssert.isNotCloseTo(long expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractLongAssert.isNotCloseTo(Long expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractShortAssert.isNotCloseTo(short expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
SELF 
AbstractShortAssert.isNotCloseTo(Short expected,
Percentage percentage)
Verifies that the actual number is not close to the given one within the given percentage.
If difference is equal to the percentage value, the assertion fails. 
Modifier and Type  Method and Description 

static Percentage 
Percentage.withPercentage(double value)
Creates a new
Percentage . 
Modifier and Type  Method and Description 

static <T extends Number> 
ShouldBeEqualWithinPercentage.shouldBeEqualWithinPercentage(T actual,
T expected,
Percentage percentage,
T difference)
Creates a new
. 
static <T extends Number> 
ShouldNotBeEqualWithinPercentage.shouldNotBeEqualWithinPercentage(T actual,
T expected,
Percentage percentage,
T difference)
Creates a new
. 
Modifier and Type  Method and Description 

void 
Numbers.assertIsCloseToPercentage(AssertionInfo info,
NUMBER actual,
NUMBER other,
Percentage percentage)
Asserts that the actual value is close to the an offset expressed as an percentage value.

void 
Numbers.assertIsNotCloseToPercentage(AssertionInfo info,
NUMBER actual,
NUMBER other,
Percentage percentage)
Asserts that the actual value is not close to the an offset expressed as an percentage value.

Copyright © 2014–2018 AssertJ. All rights reserved.