Package org.exparity.hamcrest.date
Class OffsetDateTimeMatchers
- java.lang.Object
-
- org.exparity.hamcrest.date.OffsetDateTimeMatchers
-
public abstract class OffsetDateTimeMatchers extends Object
Static factory for creatingMatcherinstances for comparingOffsetDateTimeinstances- Author:
- Stewart Bissett
-
-
Constructor Summary
Constructors Constructor Description OffsetDateTimeMatchers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TemporalMatcher<OffsetDateTime>after(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)Creates a matcher that matches when the examined date is after the end of the reference yearstatic TemporalMatcher<OffsetDateTime>after(OffsetDateTime date)Creates a matcher that matches when the examined date is after the reference datestatic TemporalMatcher<OffsetDateTime>before(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)Creates a matcher that matches when the examined date is before the end of the reference yearstatic TemporalMatcher<OffsetDateTime>before(OffsetDateTime date)Creates a matcher that matches when the examined date is before the reference datestatic TemporalMatcher<OffsetDateTime>isApril()Creates a matcher that matches when the examined date is in Aprilstatic TemporalMatcher<OffsetDateTime>isAugust()Creates a matcher that matches when the examined date is in Auguststatic TemporalMatcher<OffsetDateTime>isDay(int year, Month month, int dayOfMonth)Creates a matcher that matches when the examined date is on the same day of the year as the reference datestatic TemporalMatcher<OffsetDateTime>isDay(int year, Month month, int dayOfMonth, ZoneId zone)Creates a matcher that matches when the examined date is on the same day of the year as the reference datestatic TemporalMatcher<OffsetDateTime>isDay(LocalDate date)Creates a matcher that matches when the examined date is on the same day of the year as the reference datestatic TemporalMatcher<OffsetDateTime>isDayOfMonth(int dayOfMonth)Creates a matcher that matches when the examined date is on the expected day of the monthstatic TemporalMatcher<OffsetDateTime>isDayOfWeek(DayOfWeek dayOfWeek)Creates a matcher that matches when the examined date is on the same day of the week as the supplied daystatic TemporalMatcher<OffsetDateTime>isDayOfWeek(DayOfWeek... daysOfWeek)Creates a matcher that matches when the examined date is on the same day of the week as any of the supplied daysstatic TemporalMatcher<OffsetDateTime>isDecember()Creates a matcher that matches when the examined date is in Decemberstatic TemporalMatcher<OffsetDateTime>isFebruary()Creates a matcher that matches when the examined date is in Februarystatic TemporalMatcher<OffsetDateTime>isFirstDayOfMonth()Creates a matcher that matches when the examined date is on the first day of the monthstatic TemporalMatcher<OffsetDateTime>isFriday()Creates a matcher that matches when the examined date is on a fridaystatic TemporalMatcher<OffsetDateTime>isHour(int hour)Creates a matcher that matches when the examined date is on the expected hour (0-23)static TemporalMatcher<OffsetDateTime>isInstant(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)Creates a matcher that matches when the examined date is at the same specified instance down to the secondstatic TemporalMatcher<OffsetDateTime>isJanuary()Creates a matcher that matches when the examined date is in Januarystatic TemporalMatcher<OffsetDateTime>isJuly()Creates a matcher that matches when the examined date is in Julystatic TemporalMatcher<OffsetDateTime>isJune()Creates a matcher that matches when the examined date is in Junestatic TemporalMatcher<OffsetDateTime>isLastDayOfMonth()Creates a matcher that matches when the examined date is on the first day of the monthstatic TemporalMatcher<OffsetDateTime>isLeapYear()Creates a matcher that matches when the examined date is a leap yearstatic TemporalMatcher<OffsetDateTime>isMarch()Creates a matcher that matches when the examined date is in Marchstatic TemporalMatcher<OffsetDateTime>isMaximum(ChronoField field)Creates a matcher that matches when the examined date is on the maximum value of the given date part in its periodstatic TemporalMatcher<OffsetDateTime>isMay()Creates a matcher that matches when the examined date is in Maystatic TemporalMatcher<OffsetDateTime>isMinimum(ChronoField field)Creates a matcher that matches when the examined date is on the maximum value of the given date part in its periodstatic TemporalMatcher<OffsetDateTime>isMinute(int minute)Creates a matcher that matches when the examined date is on the expected minute (0-59)static TemporalMatcher<OffsetDateTime>isMonday()Creates a matcher that matches when the examined date is on a mondaystatic TemporalMatcher<OffsetDateTime>isMonth(Month month)Creates a matcher that matches when the examined date is in the expected monthstatic TemporalMatcher<OffsetDateTime>isNovember()Creates a matcher that matches when the examined date is in Novemberstatic TemporalMatcher<OffsetDateTime>isOctober()Creates a matcher that matches when the examined date is in Octoberstatic TemporalMatcher<OffsetDateTime>isSaturday()Creates a matcher that matches when the examined date is on a saturdaystatic TemporalMatcher<OffsetDateTime>isSecond(int second)Creates a matcher that matches when the examined date is on the expected second (0-59)static TemporalMatcher<OffsetDateTime>isSeptember()Creates a matcher that matches when the examined date is in Septemberstatic TemporalMatcher<OffsetDateTime>isSunday()Creates a matcher that matches when the examined date is on a sundaystatic TemporalMatcher<OffsetDateTime>isThursday()Creates a matcher that matches when the examined date is on a thursdaystatic TemporalMatcher<OffsetDateTime>isToday()Creates a matcher that matches when the examined date is todaystatic TemporalMatcher<OffsetDateTime>isTomorrow()Creates a matcher that matches when the examined date is tomorrowstatic TemporalMatcher<OffsetDateTime>isTuesday()Creates a matcher that matches when the examined date is on a tuesdaystatic TemporalMatcher<OffsetDateTime>isWednesday()Creates a matcher that matches when the examined date is on a wednesdaystatic TemporalMatcher<OffsetDateTime>isWeekday()Creates a matcher that matches when the examined date is on a weekdaystatic TemporalMatcher<OffsetDateTime>isWeekend()Creates a matcher that matches when the examined date is on a weekendstatic TemporalMatcher<OffsetDateTime>isYear(int year)Creates a matcher that matches when the examined date is on the same year as the reference yearstatic TemporalMatcher<OffsetDateTime>isYesterday()Creates a matcher that matches when the examined date is yesterdaystatic TemporalMatcher<OffsetDateTime>sameDay(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same day of the year as the reference datestatic TemporalMatcher<OffsetDateTime>sameDayOfMonth(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same day of the month as the reference datestatic TemporalMatcher<OffsetDateTime>sameDayOfWeek(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same day of the week as the reference datestatic TemporalMatcher<OffsetDateTime>sameHourOfDay(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same hour as the reference datestatic TemporalMatcher<OffsetDateTime>sameInstant(OffsetDateTime date)Creates a matcher that matches when the examined date is at the same instant as the reference datestatic TemporalMatcher<OffsetDateTime>sameMinuteOfHour(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same minute as the reference datestatic TemporalMatcher<OffsetDateTime>sameMonthOfYear(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same month as the reference datestatic TemporalMatcher<OffsetDateTime>sameOrAfter(int year, Month month, int day, int hour, int minute, int second, int nanos, ZoneOffset tz)Creates a matcher that matches when the examined date is on the same day or before the start of the reference datestatic TemporalMatcher<OffsetDateTime>sameOrAfter(OffsetDateTime date)Creates a matcher that matches when the examined date is at the same instant or after the reference datestatic TemporalMatcher<OffsetDateTime>sameOrBefore(int year, Month month, int day, int hour, int minute, int second, int nanos, ZoneOffset tz)Creates a matcher that matches when the examined date is on the same day or before the start of the reference datestatic TemporalMatcher<OffsetDateTime>sameOrBefore(OffsetDateTime date)Creates a matcher that matches when the examined date is at the same instant or before the reference datestatic TemporalMatcher<OffsetDateTime>sameSecondOfMinute(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same second as the reference datestatic TemporalMatcher<OffsetDateTime>sameYear(OffsetDateTime date)Creates a matcher that matches when the examined date is on the same year as the reference datestatic TemporalMatcher<OffsetDateTime>within(long period, ChronoUnit unit, int year, Month month, int dayofMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)Creates a matcher that matches when the examined date is within a given period of the reference datestatic TemporalMatcher<OffsetDateTime>within(long period, ChronoUnit unit, OffsetDateTime date)Creates a matcher that matches when the examined date is within a defined period the reference date
-
-
-
Method Detail
-
after
public static TemporalMatcher<OffsetDateTime> after(OffsetDateTime date)
Creates a matcher that matches when the examined date is after the reference date For example:MatcherAssert.assertThat(myDate, after(OffsetDateTime.now()));
- Parameters:
date- the reference date against which the examined date is checked
-
after
public static TemporalMatcher<OffsetDateTime> after(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)
Creates a matcher that matches when the examined date is after the end of the reference year For example:MatcherAssert.assertThat(myDate, after(2012, Month.MAY, 12));
- Parameters:
year- the year against which the examined date is checkedmonth- the month against which the examined date is checkeddayOfMonth- the day of the month against which the examined date is checkedhour- the hour of the dayminute- the minute of the hoursecond- the second of the minutenanos- the nanos of the second
-
before
public static TemporalMatcher<OffsetDateTime> before(OffsetDateTime date)
Creates a matcher that matches when the examined date is before the reference date For example:MatcherAssert.assertThat(myDate, before(OffsetDateTime.now()));
- Parameters:
date- the reference date against which the examined date is checked
-
before
public static TemporalMatcher<OffsetDateTime> before(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)
Creates a matcher that matches when the examined date is before the end of the reference year For example:MatcherAssert.assertThat(myDate, before(2012, Month.MAY, 12));
- Parameters:
year- the year against which the examined date is checkedmonth- the month against which the examined date is checkeddayOfMonth- the day of the month against which the examined date is checkedhour- the hour of the dayminute- the minute of the hoursecond- the second of the minutenanos- the nanos of the second
-
sameDay
public static TemporalMatcher<OffsetDateTime> sameDay(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same day of the year as the reference date For example:assertThat(myDate, sameDay(OffsetDateTime.now()));
- Parameters:
date- the reference date against which the examined date is checked
-
isDay
public static TemporalMatcher<OffsetDateTime> isDay(LocalDate date)
Creates a matcher that matches when the examined date is on the same day of the year as the reference date For example:assertThat(myDate, sameDay(LocalDate.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
isDay
public static TemporalMatcher<OffsetDateTime> isDay(int year, Month month, int dayOfMonth)
Creates a matcher that matches when the examined date is on the same day of the year as the reference date For example:assertThat(myDate, sameDay(2012, Month.JAN, 1))
- Parameters:
dayOfMonth- the reference day of the month against which the examined date is checkedmonth- the reference month against which the examined date is checkedyear- the reference year against which the examined date is checked
-
isDay
public static TemporalMatcher<OffsetDateTime> isDay(int year, Month month, int dayOfMonth, ZoneId zone)
Creates a matcher that matches when the examined date is on the same day of the year as the reference date For example:assertThat(myDate, sameDay(2012, Month.JAN, 1))
- Parameters:
dayOfMonth- the reference day of the month against which the examined date is checkedmonth- the reference month against which the examined date is checkedyear- the reference year against which the examined date is checked
-
sameInstant
public static TemporalMatcher<OffsetDateTime> sameInstant(OffsetDateTime date)
Creates a matcher that matches when the examined date is at the same instant as the reference date For example:assertThat(myDate, sameInstant(OffsetDateTime.now()));
- Parameters:
date- the reference date against which the examined date is checked
-
isInstant
public static TemporalMatcher<OffsetDateTime> isInstant(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)
Creates a matcher that matches when the examined date is at the same specified instance down to the second For example:assertThat(myDate, sameInstant(2012, Month.JAN, 1, 3, 15, 0))
- Parameters:
dayOfMonth- the reference day of the month against which the examined date is checkedmonth- the reference month against which the examined date is checkedyear- the reference year against which the examined date is checkedhour- the hour of the dayminute- the minute of the hoursecond- the second of the minutenanos- the nanosecond of the secondtz- the timezone
-
sameOrBefore
public static TemporalMatcher<OffsetDateTime> sameOrBefore(OffsetDateTime date)
Creates a matcher that matches when the examined date is at the same instant or before the reference date For example:assertThat(myDate, sameOrBefore(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
sameOrBefore
public static TemporalMatcher<OffsetDateTime> sameOrBefore(int year, Month month, int day, int hour, int minute, int second, int nanos, ZoneOffset tz)
Creates a matcher that matches when the examined date is on the same day or before the start of the reference date For example:assertThat(myDate, sameOrBefore(2012, Months.MAY, 12, 11, 59, 59, ZoneId.systemDefault()));
- Parameters:
year- the year against which the examined date is checkedmonth- the month against which the examined date is checkedday- the day of the month against which the examined date is checkedhour- the hour of the dayminute- the minute of the hoursecond- the second of the minutenanos- the nanosecond of the secondtz- the time zone of the date to check against
-
sameOrAfter
public static TemporalMatcher<OffsetDateTime> sameOrAfter(OffsetDateTime date)
Creates a matcher that matches when the examined date is at the same instant or after the reference date For example:assertThat(myDate, sameOrAfter(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
sameOrAfter
public static TemporalMatcher<OffsetDateTime> sameOrAfter(int year, Month month, int day, int hour, int minute, int second, int nanos, ZoneOffset tz)
Creates a matcher that matches when the examined date is on the same day or before the start of the reference date For example:assertThat(myDate, sameOrAfter(2012, Months.MAY, 12, 11, 59, 59, ZoneId.systemDefault()));
- Parameters:
year- the year against which the examined date is checkedmonth- the month against which the examined date is checkedday- the day of the month against which the examined date is checkedhour- the hour of the dayminute- the minute of the hoursecond- the second of the minutenanos- the nanosecond of the secondtz- the time zone of the date to check against
-
sameMonthOfYear
public static TemporalMatcher<OffsetDateTime> sameMonthOfYear(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same month as the reference date For example:assertThat(myDate, sameMonth(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
sameDayOfMonth
public static TemporalMatcher<OffsetDateTime> sameDayOfMonth(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same day of the month as the reference date For example:assertThat(myDate, sameDayOfMonth(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
isDayOfMonth
public static TemporalMatcher<OffsetDateTime> isDayOfMonth(int dayOfMonth)
Creates a matcher that matches when the examined date is on the expected day of the month For example:assertThat(myDate, isDayOfMonth(4))
- Parameters:
dayOfMonth- the expected day of the month
-
sameYear
public static TemporalMatcher<OffsetDateTime> sameYear(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same year as the reference date For example:assertThat(myDate, sameYear(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
isYear
public static TemporalMatcher<OffsetDateTime> isYear(int year)
Creates a matcher that matches when the examined date is on the same year as the reference year For example:assertThat(myDate, sameYear(2013))
- Parameters:
year- the reference year against which the examined date is checked
-
within
public static TemporalMatcher<OffsetDateTime> within(long period, ChronoUnit unit, OffsetDateTime date)
Creates a matcher that matches when the examined date is within a defined period the reference date For example:assertThat(myDate, within(10, TimeUnit.DAYS, Moments.today()))
- Parameters:
date- the reference date against which the examined date is checked
-
within
public static TemporalMatcher<OffsetDateTime> within(long period, ChronoUnit unit, int year, Month month, int dayofMonth, int hour, int minute, int second, int nanos, ZoneOffset tz)
Creates a matcher that matches when the examined date is within a given period of the reference date For example:assertThat(myDate, within(5, TimeUnit.DAYS, 2012, Months.MAY, 12));
- Parameters:
period- the timeunit interval the examined date should be withunit- the timeunit to define the length of the periodyear- the year against which the examined date is checkedmonth- the month against which the examined date is checkeddayofMonth- the day of the month against which the examined date is checkedhour- the hour of the dayminute- the minute of the hoursecond- the second of the minutenanos- the nanoseconds of the secondtz- the time zone of the reference date
-
isYesterday
public static TemporalMatcher<OffsetDateTime> isYesterday()
Creates a matcher that matches when the examined date is yesterday For example:assertThat(myDate, isToday());
-
isToday
public static TemporalMatcher<OffsetDateTime> isToday()
Creates a matcher that matches when the examined date is today For example:assertThat(myDate, isToday());
-
isTomorrow
public static TemporalMatcher<OffsetDateTime> isTomorrow()
Creates a matcher that matches when the examined date is tomorrow For example:assertThat(myDate, isTomorrow());
-
sameDayOfWeek
public static TemporalMatcher<OffsetDateTime> sameDayOfWeek(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same day of the week as the reference date For example:assertThat(myDate, sameDayOfWeek(LocalDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
isDayOfWeek
public static TemporalMatcher<OffsetDateTime> isDayOfWeek(DayOfWeek dayOfWeek)
Creates a matcher that matches when the examined date is on the same day of the week as the supplied day For example:assertThat(myDate, isMonday());
-
isDayOfWeek
public static TemporalMatcher<OffsetDateTime> isDayOfWeek(DayOfWeek... daysOfWeek)
Creates a matcher that matches when the examined date is on the same day of the week as any of the supplied days For example:assertThat(myDate, isMonday());
-
isMonday
public static TemporalMatcher<OffsetDateTime> isMonday()
Creates a matcher that matches when the examined date is on a monday For example:assertThat(myDate, isMonday());
-
isTuesday
public static TemporalMatcher<OffsetDateTime> isTuesday()
Creates a matcher that matches when the examined date is on a tuesday For example:assertThat(myDate, isTuesday());
-
isWednesday
public static TemporalMatcher<OffsetDateTime> isWednesday()
Creates a matcher that matches when the examined date is on a wednesday For example:assertThat(myDate, isWednesday());
-
isThursday
public static TemporalMatcher<OffsetDateTime> isThursday()
Creates a matcher that matches when the examined date is on a thursday For example:assertThat(myDate, isThursday());
-
isFriday
public static TemporalMatcher<OffsetDateTime> isFriday()
Creates a matcher that matches when the examined date is on a friday For example:assertThat(myDate, isFriday());
-
isSaturday
public static TemporalMatcher<OffsetDateTime> isSaturday()
Creates a matcher that matches when the examined date is on a saturday For example:assertThat(myDate, isSaturday());
-
isSunday
public static TemporalMatcher<OffsetDateTime> isSunday()
Creates a matcher that matches when the examined date is on a sunday For example:assertThat(myDate, isSunday());
-
isWeekday
public static TemporalMatcher<OffsetDateTime> isWeekday()
Creates a matcher that matches when the examined date is on a weekday For example:assertThat(myDate, isWeekday());
-
isWeekend
public static TemporalMatcher<OffsetDateTime> isWeekend()
Creates a matcher that matches when the examined date is on a weekend For example:assertThat(myDate, isWeekend());
-
isFirstDayOfMonth
public static TemporalMatcher<OffsetDateTime> isFirstDayOfMonth()
Creates a matcher that matches when the examined date is on the first day of the month For example:assertThat(myDate, isFirstDayOfMonth());
-
isMinimum
public static TemporalMatcher<OffsetDateTime> isMinimum(ChronoField field)
Creates a matcher that matches when the examined date is on the maximum value of the given date part in its period For example:assertThat(myDate, isMaximumDayOfMonth(ChronoField.DAY_OF_MONTH));
- Parameters:
field- the temporal field to check
-
isLastDayOfMonth
public static TemporalMatcher<OffsetDateTime> isLastDayOfMonth()
Creates a matcher that matches when the examined date is on the first day of the month For example:assertThat(myDate, isFirstDayOfMonth());
-
isMaximum
public static TemporalMatcher<OffsetDateTime> isMaximum(ChronoField field)
Creates a matcher that matches when the examined date is on the maximum value of the given date part in its period For example:assertThat(myDate, isMaximum(ChronoField.DAY_OF_MONTH));
- Parameters:
field- the temporal field to check
-
isMonth
public static TemporalMatcher<OffsetDateTime> isMonth(Month month)
Creates a matcher that matches when the examined date is in the expected month For example:assertThat(myDate, isMonth(Month.AUGUST));
-
isJanuary
public static TemporalMatcher<OffsetDateTime> isJanuary()
Creates a matcher that matches when the examined date is in January For example:assertThat(myDate, isJanuary());
-
isFebruary
public static TemporalMatcher<OffsetDateTime> isFebruary()
Creates a matcher that matches when the examined date is in February For example:assertThat(myDate, isFebruary());
-
isMarch
public static TemporalMatcher<OffsetDateTime> isMarch()
Creates a matcher that matches when the examined date is in March For example:assertThat(myDate, isMarch());
-
isApril
public static TemporalMatcher<OffsetDateTime> isApril()
Creates a matcher that matches when the examined date is in April For example:assertThat(myDate, isApril());
-
isMay
public static TemporalMatcher<OffsetDateTime> isMay()
Creates a matcher that matches when the examined date is in May For example:assertThat(myDate, isMay());
-
isJune
public static TemporalMatcher<OffsetDateTime> isJune()
Creates a matcher that matches when the examined date is in June For example:assertThat(myDate, isJune());
-
isJuly
public static TemporalMatcher<OffsetDateTime> isJuly()
Creates a matcher that matches when the examined date is in July For example:assertThat(myDate, isJuly());
-
isAugust
public static TemporalMatcher<OffsetDateTime> isAugust()
Creates a matcher that matches when the examined date is in August For example:assertThat(myDate, isAugust());
-
isSeptember
public static TemporalMatcher<OffsetDateTime> isSeptember()
Creates a matcher that matches when the examined date is in September For example:assertThat(myDate, isSeptember());
-
isOctober
public static TemporalMatcher<OffsetDateTime> isOctober()
Creates a matcher that matches when the examined date is in October For example:assertThat(myDate, isOctober());
-
isNovember
public static TemporalMatcher<OffsetDateTime> isNovember()
Creates a matcher that matches when the examined date is in November For example:assertThat(myDate, isNovember());
-
isDecember
public static TemporalMatcher<OffsetDateTime> isDecember()
Creates a matcher that matches when the examined date is in December For example:assertThat(myDate, isDecember());
-
isLeapYear
public static TemporalMatcher<OffsetDateTime> isLeapYear()
Creates a matcher that matches when the examined date is a leap year For example:assertThat(myDate, isLeapYear());
-
isHour
public static TemporalMatcher<OffsetDateTime> isHour(int hour)
Creates a matcher that matches when the examined date is on the expected hour (0-23) For example:assertThat(myDate, isHour(12));
- Parameters:
hour- the hour of the day (0-23)
-
sameHourOfDay
public static TemporalMatcher<OffsetDateTime> sameHourOfDay(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same hour as the reference date For example:assertThat(myDate, sameHourOfDay(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
isMinute
public static TemporalMatcher<OffsetDateTime> isMinute(int minute)
Creates a matcher that matches when the examined date is on the expected minute (0-59) For example:assertThat(myDate, isMinute(12));
- Parameters:
minute- the minute of the day (0-59)
-
sameMinuteOfHour
public static TemporalMatcher<OffsetDateTime> sameMinuteOfHour(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same minute as the reference date For example:assertThat(myDate, sameMinuteOfHour(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
isSecond
public static TemporalMatcher<OffsetDateTime> isSecond(int second)
Creates a matcher that matches when the examined date is on the expected second (0-59) For example:assertThat(myDate, isSecond(12));
- Parameters:
second- the second of the day (0-59)
-
sameSecondOfMinute
public static TemporalMatcher<OffsetDateTime> sameSecondOfMinute(OffsetDateTime date)
Creates a matcher that matches when the examined date is on the same second as the reference date For example:assertThat(myDate, sameSecondOfMinute(OffsetDateTime.now()))
- Parameters:
date- the reference date against which the examined date is checked
-
-