Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldBeBetween

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.util.Date, org.assertj.core.internal.ComparisonStrategy, .StandardComparisonStrategy

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

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)

private <T>
ShouldBeBetween(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBetween
(Date
the actual value in the failed assertion.
actual
,
Date
the lower boundary of date period.
start
,
Date
the lower boundary of date period.
end
,
boolean
whether to include start date in period.
inclusiveStart
,
boolean
whether to include end date in period.
inclusiveEnd
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldBeBetween.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBetween
(Date
the actual value in the failed assertion.
actual
,
Date
the lower boundary of date period.
start
,
Date
the lower boundary of date period.
end
,
boolean
whether to include start date in period.
inclusiveStart
,
boolean
whether to include end date in period.
inclusiveEnd
)

Creates a new ShouldBeBetween.

public static <
the type of values to compare.
T
>
ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBetween
(Comparable<? super T>
the actual value in the failed assertion.
actual
,
Comparable<? super T>
the lower boundary of range.
start
,
Comparable<? super T>
the lower boundary of range.
end
,
boolean
whether to include start value in range.
inclusiveStart
,
boolean
whether to include end value in range.
inclusiveEnd
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldBeBetween.
public static <T> ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBetween
(Object
the actual value in the failed assertion.
actual
,
Object
the lower boundary of range.
start
,
Object
the lower boundary of range.
end
,
boolean
whether to include start value in range.
inclusiveStart
,
boolean
whether to include end value in range.
inclusiveEnd
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldBeBetween.

public static <
the type of values to compare.
T
>
ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBetween
(Comparable<? super T>
the actual value in the failed assertion.
actual
,
Comparable<? super T>
the lower boundary of range.
start
,
Comparable<? super T>
the lower boundary of range.
end
,
boolean
whether to include start value in range.
inclusiveStart
,
boolean
whether to include end value in range.
inclusiveEnd
)

Creates a new ShouldBeBetween.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldBeBetweenback to summary
private ShouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)
ShouldBeBetweenback to summary
private <T> ShouldBeBetween(T actual, T start, T end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)

Method Detail

shouldBeBetweenback to summary
public static ErrorMessageFactory shouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)

Creates a new ShouldBeBetween.

Parameters
actual:Date

the actual value in the failed assertion.

start:Date

the lower boundary of date period.

end:Date

the lower boundary of date period.

inclusiveStart:boolean

whether to include start date in period.

inclusiveEnd:boolean

whether to include end date in period.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldBeBetweenback to summary
public static ErrorMessageFactory shouldBeBetween(Date actual, Date start, Date end, boolean inclusiveStart, boolean inclusiveEnd)

Creates a new ShouldBeBetween.

Parameters
actual:Date

the actual value in the failed assertion.

start:Date

the lower boundary of date period.

end:Date

the lower boundary of date period.

inclusiveStart:boolean

whether to include start date in period.

inclusiveEnd:boolean

whether to include end date in period.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldBeBetweenback to summary
public static <T> ErrorMessageFactory shouldBeBetween(Comparable<? super T> actual, Comparable<? super T> start, Comparable<? super T> end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)

Creates a new ShouldBeBetween.

Parameters
<T>
the type of values to compare.
actual:Comparable<? super T>

the actual value in the failed assertion.

start:Comparable<? super T>

the lower boundary of range.

end:Comparable<? super T>

the lower boundary of range.

inclusiveStart:boolean

whether to include start value in range.

inclusiveEnd:boolean

whether to include end value in range.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

Annotations
@Deprecated
shouldBeBetweenback to summary
public static <T> ErrorMessageFactory shouldBeBetween(Object actual, Object start, Object end, boolean inclusiveStart, boolean inclusiveEnd, ComparisonStrategy comparisonStrategy)

Creates a new ShouldBeBetween.

Parameters
actual:Object

the actual value in the failed assertion.

start:Object

the lower boundary of range.

end:Object

the lower boundary of range.

inclusiveStart:boolean

whether to include start value in range.

inclusiveEnd:boolean

whether to include end value in range.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldBeBetweenback to summary
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.

Parameters
<T>
the type of values to compare.
actual:Comparable<? super T>

the actual value in the failed assertion.

start:Comparable<? super T>

the lower boundary of range.

end:Comparable<? super T>

the lower boundary of range.

inclusiveStart:boolean

whether to include start value in range.

inclusiveEnd:boolean

whether to include end value in range.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.