Duration type.
| Access | Constructor and Description |
|---|---|
| protected | AbstractDurationAssert(Duration
the actual value to verify duration, Class<?> the "self type" selfType)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private static Duration | |
| public SELF | Returns: this assertion objectthe expected days value otherDays)Verifies that the actual |
| public SELF | Returns: this assertion objectthe expected hours value otherHours)Verifies that the actual |
| public SELF | Returns: this assertion objectthe expected milliseconds value otherMillis)Verifies that the actual |
| public SELF | Returns: this assertion objectthe expected minutes value otherMinutes)Verifies that the actual |
| public SELF | Returns: this assertion objectthe expected nanoseconds value otherNanos)Verifies that the actual |
| public SELF | Returns: this assertion objectthe expected seconds value otherSeconds)Verifies that the actual |
| public SELF | Returns: this assertion object.the given expected, Duration Duration to compare to actual.a positive allowedDifference)Duration to express the maximum allowed difference.Verifies that the actual |
| public SELF | Returns: this assertion objectVerifies that the actual |
| public SELF | Returns: this assertion objectVerifies that the actual |
| public SELF |
| AbstractDurationAssert | back to summary |
|---|---|
| protected AbstractDurationAssert(Duration duration, Class<?> selfType) Creates a new | |
| absDiff | back to summary |
|---|---|
| private static Duration absDiff(Duration actual, Duration expected) | |
| hasDays | back to summary |
|---|---|
| public SELF hasDays(long otherDays) Verifies that the actual Example :
| |
| hasHours | back to summary |
|---|---|
| public SELF hasHours(long otherHours) Verifies that the actual Example :
| |
| hasMillis | back to summary |
|---|---|
| public SELF hasMillis(long otherMillis) Verifies that the actual Example :
| |
| hasMinutes | back to summary |
|---|---|
| public SELF hasMinutes(long otherMinutes) Verifies that the actual Example :
| |
| hasNanos | back to summary |
|---|---|
| public SELF hasNanos(long otherNanos) Verifies that the actual Example :
| |
| hasSeconds | back to summary |
|---|---|
| public SELF hasSeconds(long otherSeconds) Verifies that the actual Example :
| |
| isCloseTo | back to summary |
|---|---|
| public SELF isCloseTo(Duration expected, Duration allowedDifference) Verifies that the actual
This is equivalent of:
For readability you can use Examples:
| |
| isNegative | back to summary |
|---|---|
| public SELF isNegative() Verifies that the actual Example :
| |
| isPositive | back to summary |
|---|---|
| public SELF isPositive() Verifies that the actual Example :
| |
| isZero | back to summary |
|---|---|
| public SELF isZero() Verifies that the actual Example :
| |