| Constructor and Description |
|---|
IsSameMillisecond(Date date) |
IsSameMillisecond(int millisecond) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
protected boolean |
matchesSafely(Date actual,
org.hamcrest.Description mismatchDesc) |
static org.hamcrest.Matcher<Date> |
sameMillisecond(Date date)
Creates a matcher that matches when the examined date is on the same millisecond as the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameMillisecond(int millisecond)
Creates a matcher that matches when the examined date is on the reference second
For example:
|
public IsSameMillisecond(Date date)
public IsSameMillisecond(int millisecond)
public static org.hamcrest.Matcher<Date> sameMillisecond(Date date)
assertThat(myDate, sameMillisecond(new Date()))
date - the reference date against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameMillisecond(int millisecond)
assertThat(myDate, sameMillisecond(123))
millisecond - the millisecond against which the examined date is checkedprotected boolean matchesSafely(Date actual, org.hamcrest.Description mismatchDesc)
matchesSafely in class org.hamcrest.TypeSafeDiagnosingMatcher<Date>public void describeTo(org.hamcrest.Description description)
Copyright © 2014. All Rights Reserved.