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