| Constructor and Description |
|---|
IsSameMonth(Date date) |
IsSameMonth(Months month) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
static org.hamcrest.Matcher<Date> |
isApril()
Creates a matcher that matches when the examined date is in April
For example:
|
static org.hamcrest.Matcher<Date> |
isAugust()
Creates a matcher that matches when the examined date is in August
For example:
|
static org.hamcrest.Matcher<Date> |
isDecember()
Creates a matcher that matches when the examined date is in December
For example:
|
static org.hamcrest.Matcher<Date> |
isFebruary()
Creates a matcher that matches when the examined date is in February
For example:
|
static org.hamcrest.Matcher<Date> |
isJanuary()
Creates a matcher that matches when the examined date is in January
For example:
|
static org.hamcrest.Matcher<Date> |
isJuly()
Creates a matcher that matches when the examined date is in July
For example:
|
static org.hamcrest.Matcher<Date> |
isJune()
Creates a matcher that matches when the examined date is in June
For example:
|
static org.hamcrest.Matcher<Date> |
isMarch()
Creates a matcher that matches when the examined date is in March
For example:
|
static org.hamcrest.Matcher<Date> |
isMay()
Creates a matcher that matches when the examined date is in May
For example:
|
static org.hamcrest.Matcher<Date> |
isNovember()
Creates a matcher that matches when the examined date is in November
For example:
|
static org.hamcrest.Matcher<Date> |
isOctober()
Creates a matcher that matches when the examined date is in October
For example:
|
static org.hamcrest.Matcher<Date> |
isSeptember()
Creates a matcher that matches when the examined date is in September
For example:
|
protected boolean |
matchesSafely(Date actual,
org.hamcrest.Description mismatchDesc) |
static org.hamcrest.Matcher<Date> |
sameMonth(Date date)
Creates a matcher that matches when the examined date is on the same month as the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameMonth(Months month)
Creates a matcher that matches when the examined date is on the same month as the reference month
For example:
|
public IsSameMonth(Date date)
public IsSameMonth(Months month)
public static org.hamcrest.Matcher<Date> sameMonth(Date date)
assertThat(myDate, sameMonth(new Date()))
date - the reference date against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameMonth(Months month)
assertThat(myDate, sameMonth(Months.DECEMBER))
month - the reference month against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> isJanuary()
assertThat(myDate, isJanuary());
public static org.hamcrest.Matcher<Date> isFebruary()
assertThat(myDate, isFebruary());
public static org.hamcrest.Matcher<Date> isMarch()
assertThat(myDate, isMarch());
public static org.hamcrest.Matcher<Date> isApril()
assertThat(myDate, isApril());
public static org.hamcrest.Matcher<Date> isMay()
assertThat(myDate, isMay());
public static org.hamcrest.Matcher<Date> isJune()
assertThat(myDate, isJune());
public static org.hamcrest.Matcher<Date> isJuly()
assertThat(myDate, isJuly());
public static org.hamcrest.Matcher<Date> isAugust()
assertThat(myDate, isAugust());
public static org.hamcrest.Matcher<Date> isSeptember()
assertThat(myDate, isSeptember());
public static org.hamcrest.Matcher<Date> isOctober()
assertThat(myDate, isOctober());
public static org.hamcrest.Matcher<Date> isNovember()
assertThat(myDate, isNovember());
public static org.hamcrest.Matcher<Date> isDecember()
assertThat(myDate, isDecember());
protected 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.