/** * Verifies that the actual {@code Date} millisecond is equal to the given millisecond. * @param info contains information about the assertion. * @param actual the "actual" {@code Date}. * @param millisecond the millisecond to compare actual millisecond to * @throws AssertionError if {@code actual} is {@code null}. * @throws AssertionError if the actual {@code Date} millisecond is not equal to the given millisecond. */ public void assertHasMillisecond(AssertionInfo info, Date actual, int millisecond) { assertNotNull(info, actual); if (millisecondOf(actual) != millisecond) throw failures.failure(info, shouldHaveDateField(actual, "millisecond", millisecond)); }
/** * Verifies that the actual {@code Date} millisecond is equal to the given millisecond. * @param info contains information about the assertion. * @param actual the "actual" {@code Date}. * @param millisecond the millisecond to compare actual millisecond to * @throws AssertionError if {@code actual} is {@code null}. * @throws AssertionError if the actual {@code Date} millisecond is not equal to the given millisecond. */ public void assertHasMillisecond(AssertionInfo info, Date actual, int millisecond) { assertNotNull(info, actual); if (millisecondOf(actual) != millisecond) throw failures.failure(info, shouldHaveDateField(actual, "millisecond", millisecond)); }