| Constructor and Description |
|---|
IsSameSecond(Date date) |
IsSameSecond(int second) |
| 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> |
sameSecond(Date date)
Creates a matcher that matches when the examined date is on the same second as the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameSecond(int second)
Creates a matcher that matches when the examined date is on the reference second
For example:
|
public IsSameSecond(Date date)
public IsSameSecond(int second)
public static org.hamcrest.Matcher<Date> sameSecond(Date date)
assertThat(myDate, sameSecond(new Date()))
date - the reference date against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameSecond(int second)
assertThat(myDate, sameSecond(33))
second - the reference second 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.