Package org.assertj.core.error
Class OptionalDoubleShouldHaveValueCloseToOffset
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.OptionalDoubleShouldHaveValueCloseToOffset
- All Implemented Interfaces:
ErrorMessageFactory
Build error message when an
OptionalDouble 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
Modifier and TypeMethodDescriptionshouldHaveValueCloseToOffset(double expectedValue) Indicates that anOptionalDoubleis empty so it doesn't have the expected value.shouldHaveValueCloseToOffset(OptionalDouble optional, double expectedValue, Offset<Double> offset, double difference) Indicates that the providedOptionalDoubledoes not have the provided argument.Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Method Details
-
shouldHaveValueCloseToOffset
public static OptionalDoubleShouldHaveValueCloseToOffset shouldHaveValueCloseToOffset(OptionalDouble optional, double expectedValue, Offset<Double> offset, double difference) Indicates that the providedOptionalDoubledoes not have the provided argument.- Parameters:
optional- theOptionalDoublewhich 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
-
shouldHaveValueCloseToOffset
public static OptionalDoubleShouldHaveValueCloseToOffset shouldHaveValueCloseToOffset(double expectedValue) Indicates that anOptionalDoubleis empty so it doesn't have the expected value.- Parameters:
expectedValue- the value we expect to be in anOptionalDouble.- Returns:
- a error message factory.
-