Package org.assertj.core.error
Class OptionalDoubleShouldHaveValueCloseTo
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.error.OptionalDoubleShouldHaveValueCloseTo
-
- All Implemented Interfaces:
ErrorMessageFactory
public class OptionalDoubleShouldHaveValueCloseTo extends BasicErrorMessageFactory
Build error message when anOptionalDouble
should have a specific value close to an offset.- Author:
- Jean-Christophe Gay, Alexander Bischof
-
-
Field Summary
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OptionalDoubleShouldHaveValueCloseTo
shouldHaveValueCloseTo(double expectedValue)
Indicates that anOptionalDouble
is empty so it doesn't have the expected value.static OptionalDoubleShouldHaveValueCloseTo
shouldHaveValueCloseTo(OptionalDouble optional, double expectedValue, Offset<Double> offset, double difference)
Indicates that the providedOptionalDouble
does not have the provided argument.-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Method Detail
-
shouldHaveValueCloseTo
public static OptionalDoubleShouldHaveValueCloseTo shouldHaveValueCloseTo(OptionalDouble optional, double expectedValue, Offset<Double> offset, double difference)
Indicates that the providedOptionalDouble
does not have the provided argument.- Parameters:
optional
- theOptionalDouble
which has a value.expectedValue
- the value we expect to be in the providedOptionalDouble
.offset
- the given positive offset.difference
- the effective difference between actual and expected.- Returns:
- a error message factory
-
shouldHaveValueCloseTo
public static OptionalDoubleShouldHaveValueCloseTo shouldHaveValueCloseTo(double expectedValue)
Indicates that anOptionalDouble
is empty so it doesn't have the expected value.- Parameters:
expectedValue
- the value we expect to be in anOptionalDouble
.- Returns:
- a error message factory.
-
-