Class ChronoLocalDateTimeMatcher

java.lang.Object
io.github.cjstehno.testthings.match.ChronoLocalDateTimeMatcher

public final class ChronoLocalDateTimeMatcher extends Object
Provides some matchers for working with ChronoLocalDateTime objects - most of these are just syntax aliases on top of standard Hamcrest matchers - useful to make code more clear.
  • Constructor Details

    • ChronoLocalDateTimeMatcher

      public ChronoLocalDateTimeMatcher()
  • Method Details

    • isBefore

      public static org.hamcrest.Matcher<ChronoLocalDateTime<?>> isBefore(ChronoLocalDateTime<?> dateTime)
      Matches a date-time that is before (less than but not equal to) the specified date value.
      Parameters:
      dateTime - the target date-time value
      Returns:
      the matcher
    • isEqualOrBefore

      public static org.hamcrest.Matcher<ChronoLocalDateTime<?>> isEqualOrBefore(ChronoLocalDateTime<?> dateTime)
      Matches a date-time that is before or equal to the specified date-time value.
      Parameters:
      dateTime - the target date-time value
      Returns:
      the matcher
    • isAfter

      public static org.hamcrest.Matcher<ChronoLocalDateTime<?>> isAfter(ChronoLocalDateTime<?> dateTime)
      Matches a date-time that is after (greater than but not equal to) the specified date-time value.
      Parameters:
      dateTime - the target date-time value
      Returns:
      the matcher
    • isEqualOrAfter

      public static org.hamcrest.Matcher<ChronoLocalDateTime<?>> isEqualOrAfter(ChronoLocalDateTime<?> dateTime)
      Matches a date-time that is after or equal to the specified date-time value.
      Parameters:
      dateTime - the target date-time value
      Returns:
      the matcher