/** * Returns true if both date are in the same year, month, day of month, hour and minute, false otherwise. * @param actual the actual date. expected not be null * @param other the other date. expected not be null * @return true if both date are in the same year, month, day of month, hour and minute, false otherwise. */ private static boolean areInSameMinute(Date actual, Date other) { return areInSameHour(actual, other) && minuteOf(actual) == minuteOf(other); }
/** * Returns true if both date are in the same year, month, day of month, hour and minute, false otherwise. * @param actual the actual date. expected not be null * @param other the other date. expected not be null * @return true if both date are in the same year, month, day of month, hour and minute, false otherwise. */ private static boolean areInSameMinute(Date actual, Date other) { return areInSameHour(actual, other) && minuteOf(actual) == minuteOf(other); }
/** * Verifies that the actual {@code Date} minute is equal to the given minute. * @param info contains information about the assertion. * @param actual the "actual" {@code Date}. * @param minute the minute to compare actual minute to * @throws AssertionError if {@code actual} is {@code null}. * @throws AssertionError if the actual {@code Date} minute is not equal to the given minute. */ public void assertHasMinute(AssertionInfo info, Date actual, int minute) { assertNotNull(info, actual); if (minuteOf(actual) != minute) throw failures.failure(info, shouldHaveDateField(actual, "minute", minute)); }
/** * Verifies that the actual {@code Date} minute is equal to the given minute. * @param info contains information about the assertion. * @param actual the "actual" {@code Date}. * @param minute the minute to compare actual minute to * @throws AssertionError if {@code actual} is {@code null}. * @throws AssertionError if the actual {@code Date} minute is not equal to the given minute. */ public void assertHasMinute(AssertionInfo info, Date actual, int minute) { assertNotNull(info, actual); if (minuteOf(actual) != minute) throw failures.failure(info, shouldHaveDateField(actual, "minute", minute)); }