Package org.assertj.core.error
Class ShouldBeBetween
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldBeBetween
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a
Date
is between start - end dates (inclusive
or not) failed.-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ShouldBeBetween
(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) private
ShouldBeBetween
(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorMessageFactory
shouldBeBetween
(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd) Creates a newShouldBeBetween
.static ErrorMessageFactory
shouldBeBetween
(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) Creates a newShouldBeBetween
.static <T extends Comparable<? super T>>
ErrorMessageFactoryshouldBeBetween
(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd) Creates a newShouldBeBetween
.static <T extends Comparable<? super T>>
ErrorMessageFactoryshouldBeBetween
(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) Creates a newShouldBeBetween
.Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Constructor Details
-
ShouldBeBetween
private ShouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) -
ShouldBeBetween
private ShouldBeBetween(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)
-
-
Method Details
-
shouldBeBetween
public static ErrorMessageFactory shouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) Creates a newShouldBeBetween
.- Parameters:
actual
- the actual value in the failed assertion.start
- the lower boundary of date period.end
- the lower boundary of date period.inclusiveStart
- whether to include start date in period.inclusiveEnd
- whether to include end date in period.comparisonStrategy
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeBetween
public static ErrorMessageFactory shouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd) Creates a newShouldBeBetween
.- Parameters:
actual
- the actual value in the failed assertion.start
- the lower boundary of date period.end
- the lower boundary of date period.inclusiveStart
- whether to include start date in period.inclusiveEnd
- whether to include end date in period.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeBetween
public static <T extends Comparable<? super T>> ErrorMessageFactory shouldBeBetween(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy) Creates a newShouldBeBetween
.- Parameters:
actual
- the actual value in the failed assertion.start
- the lower boundary of range.end
- the lower boundary of range.inclusiveStart
- whether to include start value in range.inclusiveEnd
- whether to include end value in range.comparisonStrategy
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeBetween
public static <T extends Comparable<? super T>> ErrorMessageFactory shouldBeBetween(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd) Creates a newShouldBeBetween
.- Parameters:
actual
- the actual value in the failed assertion.start
- the lower boundary of range.end
- the lower boundary of range.inclusiveStart
- whether to include start value in range.inclusiveEnd
- whether to include end value in range.- Returns:
- the created
ErrorMessageFactory
.
-