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 value is between a start and an end
(inclusive or not) failed.
- Author:
- Joel Costigliola
-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ErrorMessageFactory
shouldBeBetween
(Comparable<? super T> actual, Comparable<? super T> start, Comparable<? super T> end, boolean inclusiveStart, boolean inclusiveEnd) Creates a new
.ShouldBeBetween
static <T> ErrorMessageFactory
shouldBeBetween
(Comparable<? super T> actual, Comparable<? super T> start, Comparable<? super T> end, boolean inclusiveStart, boolean inclusiveEnd, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Deprecated.static <T> ErrorMessageFactory
shouldBeBetween
(Object actual, Object start, Object end, boolean inclusiveStart, boolean inclusiveEnd, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldBeBetween
static ErrorMessageFactory
shouldBeBetween
(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd) Creates a new
.ShouldBeBetween
static ErrorMessageFactory
shouldBeBetween
(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldBeBetween
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Method Details
-
shouldBeBetween
public static ErrorMessageFactory shouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldBeBetween
- 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 new
.ShouldBeBetween
- 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
@Deprecated public static <T> ErrorMessageFactory shouldBeBetween(Comparable<? super T> actual, Comparable<? super T> start, Comparable<? super T> end, boolean inclusiveStart, boolean inclusiveEnd, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Deprecated.Creates a new
.ShouldBeBetween
- Type Parameters:
T
- the type of values to compare.- 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> ErrorMessageFactory shouldBeBetween(Object actual, Object start, Object end, boolean inclusiveStart, boolean inclusiveEnd, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldBeBetween
- 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> ErrorMessageFactory shouldBeBetween(Comparable<? super T> actual, Comparable<? super T> start, Comparable<? super T> end, boolean inclusiveStart, boolean inclusiveEnd) Creates a new
.ShouldBeBetween
- Type Parameters:
T
- the type of values to compare.- 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
.
-
shouldBeBetween(Object, Object, Object, boolean, boolean, ComparisonStrategy)
instead.