hasDateAndTime function

Matcher hasDateAndTime(
  1. Object year, [
  2. Object month = 1,
  3. Object day = 1,
  4. Object hour = 0,
  5. Object minute = 0,
  6. Object second = 0,
  7. Object nanosecond = 0,
])

Matches the date and time from a HasDateTime.

Implementation

Matcher hasDateAndTime(Object year,
        [Object month = 1,
        Object day = 1,
        Object hour = 0,
        Object minute = 0,
        Object second = 0,
        Object nanosecond = 0]) =>
    isA<HasDateTime>()
        .having((d) => d.year, 'year', year)
        .having((d) => d.month, 'month', month)
        .having((d) => d.day, 'day', day)
        .having((t) => t.hour, 'hour', hour)
        .having((t) => t.minute, 'minute', minute)
        .having((t) => t.second, 'second', second)
        .having((t) => t.nanosecond, 'nanosecond', nanosecond);