R
- The return type.public class FluentDateAssertion<R> extends FluentComparableAssertion<R>
Constructor and Description |
---|
FluentDateAssertion(Assertion creator,
Date value,
R returns)
Constructor.
|
FluentDateAssertion(Date value,
R returns)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
R |
isAfter(Date value)
Asserts that the value is after the specified value.
|
R |
isAfterNow()
Asserts that the value is after the current date.
|
R |
isBefore(Date value)
Asserts that the value is before the specified value.
|
R |
isBeforeNow()
Asserts that the value is before the current date.
|
R |
isBetween(Date lower,
Date upper)
Asserts that the value is between (exclusive) the specified upper and lower values.
|
R |
isEqual(Date value,
ChronoUnit precision)
Asserts that the value equals the specified value at the specified precision.
|
FluentDateAssertion<R> |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
FluentDateAssertion<R> |
stderr()
If an error occurs, send the error message to STDERR.
|
FluentDateAssertion<R> |
stdout()
If an error occurs, send the error message to STDOUT.
|
compareTo, isBetween, isGreaterThan, isGreaterThanOrEqual, isGt, isGte, isLessThan, isLessThanOrEqual, isLt, isLte
doesNotEqual, doesNotExist, equivalent, exists, is, isAny, isEqual, isNot, isNotAny, isNotNull, isNull, isType, json, jsonSorted, passes, passes, sameAs, sameAsSerialized, sameAsSorted, serialized, string, string, string
returns
assertNotNull, assertNotNull, className, error
public FluentDateAssertion(Date value, R returns)
value
- The value being tested.returns
- The object to return after the test.public FluentDateAssertion(Assertion creator, Date value, R returns)
creator
- The assertion that created this assertion.value
- The value being tested.returns
- The object to return after the test.public R isEqual(Date value, ChronoUnit precision) throws AssertionError
value
- The value to check against.precision
- The precision (e.g. ChronoUnit.SECONDS
.AssertionError
- If assertion failed.public R isAfter(Date value) throws AssertionError
value
- The values to check against.AssertionError
- If assertion failed.public R isAfterNow() throws AssertionError
AssertionError
- If assertion failed.public R isBefore(Date value) throws AssertionError
value
- The values to check against.AssertionError
- If assertion failed.public R isBeforeNow() throws AssertionError
AssertionError
- If assertion failed.public R isBetween(Date lower, Date upper) throws AssertionError
lower
- The lower value to check against.upper
- The upper value to check against.AssertionError
- If assertion failed.public FluentDateAssertion<R> msg(String msg, Object... args)
Assertion
String can contain
msg
in class FluentComparableAssertion<R>
msg
- The assertion failure message.args
- Optional message arguments.public FluentDateAssertion<R> stderr()
Assertion
stderr
in class FluentComparableAssertion<R>
public FluentDateAssertion<R> stdout()
Assertion
stdout
in class FluentComparableAssertion<R>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.