testing library

Useful matchers for testing dates and times.

Functions

hasDate(Object? year, [Object? month = 1, Object? day = 1]) → Matcher
Matches the date from a HasDate.
hasDateAndTime(Object year, [Object month = 1, Object day = 1, Object hour = 0, Object minute = 0, Object second = 0, Object nanosecond = 0]) → Matcher
Matches the date and time from a HasDateTime.
hasDay(Object? matcher) → Matcher
Matches the day from a HasDate.
hasHour(Object? matcher) → Matcher
Matches the hour from a HasTime.
hasInstant(Object? matcher) → Matcher
Matches the instant from a HasInstant.
hasMinute(Object? matcher) → Matcher
Matches the minute from a HasTime.
hasMonth(Object? matcher) → Matcher
Matches the month from a HasDate.
hasNanosecond(Object? matcher) → Matcher
Matches the nanosecond from a HasTime.
hasOffset(Object? hours, [Object? minutes = isZero, Object? seconds = isZero]) → Matcher
Matches the values the time zone offset of an OffsetDateTime or ZonedDateTime.
hasSecond(Object? matcher) → Matcher
Matches the second from a HasTime.
hasTime(Object? hour, [Object? minute = 0, Object? second = 0, Object? nanosecond = 0]) → Matcher
Matches the time from a HasTime.
hasUnixMicroseconds(Object matcher) → Matcher
Matches the Unix microseconds of a HasInstant.
hasUnixMilliseconds(Object matcher) → Matcher
Matches the Unix milliseconds of a HasInstant.
hasUnixNanoseconds(Object seconds, Object nanoseconds) → Matcher
Matches the full precision Unix time of a HasInstant.
hasUnixSeconds(Object matcher) → Matcher
Matches the Unix seconds of a HasInstant.
hasWeekday(Object? matcher) → Matcher
Matches the weekday from a HasDate.
hasYear(Object? matcher) → Matcher
Matches the year from a HasDate.