LocalTime type from new Date & Time API introduced in Java 8.
| Modifier and Type | Field and Description |
|---|---|
| public static final String |
| Access | Constructor and Description |
|---|---|
| protected | AbstractLocalTimeAssert(LocalTime
the actual value to verify actual, Class<?> the "self type" selfType)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | Returns: true if both localtime are in the same year, month and day of month, hour, minute and second, false otherwise.the actual localtime. expected not be null actual, LocalTime the other localtime. expected not be null other)Returns true if both localtime are in the same year, month and day of month, hour, minute and second, false otherwise. |
| private static boolean | Returns: true if both localtime are in the same year, month, day of month, hour and minute, false otherwise.the actual localtime. expected not be null actual, LocalTime the other localtime. expected not be null other)Returns true if both localtime are in the same year, month, day of month, hour and minute, false otherwise. |
| private static void | assertLocalTimeAsStringParameterIsNotNull(String
String representing the localTimeAsString)LocalTime to compare actual withCheck that the |
| private static void | assertLocalTimeParameterIsNotNull(LocalTime
the other)LocalTime to checkCheck that the |
| private void | |
| private static Object[] | |
| public SELF | Returns: this assertion object.the given hour. hour)Verifies that actual |
| public SELF | Returns: this assertion object.the given minute. minute)Verifies that actual |
| public SELF | Returns: this assertion object.the given nano. nano)Verifies that actual |
| public SELF | Returns: this assertion object.the given other)LocalTime.Verifies that actual and given |
| public SELF | Returns: this assertion object.the given second. second)Verifies that actual |
| private static boolean | |
| public SELF | |
| public SELF | Returns: this assertion object.String representing a localTimeAsString)LocalTime.Same assertion as |
| public SELF | Returns: this assertion object.the given other)LocalTime.Verifies that the actual |
| public SELF | Returns: this assertion object.String representing a localTimeAsString)LocalTime.Same assertion as |
| public SELF | |
| public SELF | Returns: this assertion object.String representing a localTimeAsString)LocalTime.Same assertion as |
| public SELF | Returns: this assertion object.the given other)LocalTime.Verifies that the actual |
| public SELF | Returns: this assertion object.String representing a localTimeAsString)LocalTime.Same assertion as |
| public SELF | |
| public SELF | Returns: this assertion object.the start value (inclusive), expected not to be null. startInclusive, String the end value (inclusive), expected not to be null. endInclusive)Same assertion as |
| public SELF | isCloseTo(LocalTime
the temporal to compare actual to other, TemporalOffset<? super LocalTime> the offset used for comparison offset)Overrides org. Temporal is close to the other according to the given TemporalOffset.
|
| public SELF | Returns: this assertion object.String representing a localTimeAsString)LocalTime.Same assertion as |
| public SELF | Returns: this assertion object.the given other)LocalTime.
Deprecated
Use
Verifies that actual and given isCloseTo(LocalTime, TemporalOffset) instead, although not exactly the same semantics,
this is the right way to compare with a given precision.
LocalTime have same hour, minute and second fields (nanosecond fields are
ignored in comparison).
|
| public SELF | Returns: this assertion object.the given other)LocalTime.
Deprecated
Use
Verifies that actual and given isCloseTo(LocalTime, TemporalOffset) instead, although not exactly the same semantics,
this is the right way to compare with a given precision.
LocalTime have same hour and minute fields (second and nanosecond fields are
ignored in comparison).
|
| public SELF | Returns: this assertion object.String array representing localTimesAsString)LocalTimes.Same assertion as |
| public SELF | Returns: this assertion object.String representing a localTimeAsString)LocalTime.Same assertion as |
| public SELF | Returns: this assertion object.Array of String representing a localTimesAsString)LocalTime.Same assertion as |
| public SELF | Returns: this assertion object.the start value (exclusive), expected not to be null. startExclusive, LocalTime the end value (exclusive), expected not to be null. endExclusive)Verifies that the actual |
| public SELF | Returns: this assertion object.the start value (exclusive), expected not to be null. startExclusive, String the end value (exclusive), expected not to be null. endExclusive)Same assertion as |
| protected LocalTime | parse(String
the string to parse, not null localTimeAsString)Implements abstract org. TEMPORAL from a string representation in ISO date format.
|
| NULL_LOCAL_TIME_PARAMETER_MESSAGE | back to summary |
|---|---|
| public static final String NULL_LOCAL_TIME_PARAMETER_MESSAGE | |
| AbstractLocalTimeAssert | back to summary |
|---|---|
| protected AbstractLocalTimeAssert(LocalTime actual, Class<?> selfType) Creates a new | |
| areEqualIgnoringNanos | back to summary |
|---|---|
| private static boolean areEqualIgnoringNanos(LocalTime actual, LocalTime other) Returns true if both localtime are in the same year, month and day of month, hour, minute and second, false otherwise. | |
| areEqualIgnoringSeconds | back to summary |
|---|---|
| private static boolean areEqualIgnoringSeconds(LocalTime actual, LocalTime other) Returns true if both localtime are in the same year, month, day of month, hour and minute, false otherwise. | |
| assertLocalTimeAsStringParameterIsNotNull | back to summary |
|---|---|
| private static void assertLocalTimeAsStringParameterIsNotNull(String localTimeAsString) Check that the
| |
| assertLocalTimeParameterIsNotNull | back to summary |
|---|---|
| private static void assertLocalTimeParameterIsNotNull(LocalTime other) Check that the
| |
| checkIsNotNullAndNotEmpty | back to summary |
|---|---|
| private void checkIsNotNullAndNotEmpty(Object[] values) | |
| convertToLocalTimeArray | back to summary |
|---|---|
| private static Object[] convertToLocalTimeArray(String... localTimesAsString) | |
| hasHour | back to summary |
|---|---|
| public SELF hasHour(int hour) Verifies that actual Example:
| |
| hasMinute | back to summary |
|---|---|
| public SELF hasMinute(int minute) Verifies that actual Example:
| |
| hasNano | back to summary |
|---|---|
| public SELF hasNano(int nano) Verifies that actual Example:
| |
| hasSameHourAs | back to summary |
|---|---|
| public SELF hasSameHourAs(LocalTime other) Verifies that actual and given Assertion can fail with localTimes in same chronological second time window, e.g : 01:00:00.000 and 00:59:59.000. Time difference is only 1s but hour fields differ. Code example :
| |
| hasSecond | back to summary |
|---|---|
| public SELF hasSecond(int second) Verifies that actual Example:
| |
| haveSameHourField | back to summary |
|---|---|
| private static boolean haveSameHourField(LocalTime actual, LocalTime other) | |
| isAfter | back to summary |
|---|---|
| public SELF isAfter(LocalTime other) Verifies that the actual Example :
| |
| isAfter | back to summary |
|---|---|
| public SELF isAfter(String localTimeAsString) Same assertion as Example :
| |
| isAfterOrEqualTo | back to summary |
|---|---|
| public SELF isAfterOrEqualTo(LocalTime other) Verifies that the actual Example :
| |
| isAfterOrEqualTo | back to summary |
|---|---|
| public SELF isAfterOrEqualTo(String localTimeAsString) Same assertion as Example :
| |
| isBefore | back to summary |
|---|---|
| public SELF isBefore(LocalTime other) Verifies that the actual Example :
| |
| isBefore | back to summary |
|---|---|
| public SELF isBefore(String localTimeAsString) Same assertion as Example :
| |
| isBeforeOrEqualTo | back to summary |
|---|---|
| public SELF isBeforeOrEqualTo(LocalTime other) Verifies that the actual Example :
| |
| isBeforeOrEqualTo | back to summary |
|---|---|
| public SELF isBeforeOrEqualTo(String localTimeAsString) Same assertion as Example :
| |
| isBetween | back to summary |
|---|---|
| public SELF isBetween(LocalTime startInclusive, LocalTime endInclusive) Verifies that the actual Example:
| |
| isBetween | back to summary |
|---|---|
| public SELF isBetween(String startInclusive, String endInclusive) Same assertion as Example:
| |
| isCloseTo | back to summary |
|---|---|
| public SELF isCloseTo(LocalTime other, TemporalOffset<? super LocalTime> offset) Overrides org. Doc from org. Verifies that the actual
You can build the offset parameter using Example:
| |
| isEqualTo | back to summary |
|---|---|
| public SELF isEqualTo(String localTimeAsString) Same assertion as Example :
| |
| isEqualToIgnoringNanos | back to summary |
|---|---|
| public SELF isEqualToIgnoringNanos(LocalTime other)
Deprecated Use Verifies that actual and given Assertion can fail with localTimes in same chronological nanosecond time window, e.g : 23:00:01.000000000 and 23:00:00.999999999. Assertion fails as second fields differ even if time difference is only 1ns. Code example :
| |
| isEqualToIgnoringSeconds | back to summary |
|---|---|
| public SELF isEqualToIgnoringSeconds(LocalTime other)
Deprecated Use Verifies that actual and given Assertion can fail with LocalTimes in same chronological second time window, e.g : 23:01:00.000 and 23:00:59.000. Assertion fails as minute fields differ even if time difference is only 1s. Code example :
| |
| isIn | back to summary |
|---|---|
| public SELF isIn(String... localTimesAsString) Same assertion as Example :
| |
| isNotEqualTo | back to summary |
|---|---|
| public SELF isNotEqualTo(String localTimeAsString) Same assertion as Example :
| |
| isNotIn | back to summary |
|---|---|
| public SELF isNotIn(String... localTimesAsString) Same assertion as Example :
| |
| isStrictlyBetween | back to summary |
|---|---|
| public SELF isStrictlyBetween(LocalTime startExclusive, LocalTime endExclusive) Verifies that the actual Example:
| |
| isStrictlyBetween | back to summary |
|---|---|
| public SELF isStrictlyBetween(String startExclusive, String endExclusive) Same assertion as Example:
| |
| parse | back to summary |
|---|---|
| protected LocalTime parse(String localTimeAsString) Implements abstract org. Doc from org. Obtains an instance of | |