| Constructor and Description |
|---|
IsSameDayOfWeek(Date date) |
IsSameDayOfWeek(Weekdays weekday) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
static org.hamcrest.Matcher<Date> |
isFriday()
Creates a matcher that matches when the examined date is on a friday
For example:
|
static org.hamcrest.Matcher<Date> |
isMonday()
Creates a matcher that matches when the examined date is on a monday
For example:
|
static org.hamcrest.Matcher<Date> |
isSaturday()
Creates a matcher that matches when the examined date is on a saturday
For example:
|
static org.hamcrest.Matcher<Date> |
isSunday()
Creates a matcher that matches when the examined date is on a sunday
For example:
|
static org.hamcrest.Matcher<Date> |
isThursday()
Creates a matcher that matches when the examined date is on a thursday
For example:
|
static org.hamcrest.Matcher<Date> |
isTuesday()
Creates a matcher that matches when the examined date is on a tuesday
For example:
|
static org.hamcrest.Matcher<Date> |
isWednesday()
Creates a matcher that matches when the examined date is on a wednesday
For example:
|
static org.hamcrest.Matcher<Date> |
isWeekday()
Creates a matcher that matches when the examined date is on a weekday
For example:
|
static org.hamcrest.Matcher<Date> |
isWeekend()
Creates a matcher that matches when the examined date is on a weekend
For example:
|
protected boolean |
matchesSafely(Date actual,
org.hamcrest.Description mismatchDesc) |
static org.hamcrest.Matcher<Date> |
sameDayOfWeek(Date date)
Creates a matcher that matches when the examined date is on the same day of the week as the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameDayOfWeek(Weekdays weekday)
Creates a matcher that matches when the examined date is on the same day of the week as the supplied day
For example:
|
public IsSameDayOfWeek(Date date)
public IsSameDayOfWeek(Weekdays weekday)
public static org.hamcrest.Matcher<Date> sameDayOfWeek(Date date)
assertThat(myDate, sameDayOfTheWeek(new Date()))
date - the reference date against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameDayOfWeek(Weekdays weekday)
assertThat(myDate, sameDayOfTheWeek(new Date()))
weekday - the reference weekday against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> isMonday()
assertThat(myDate, isMonday());
public static org.hamcrest.Matcher<Date> isTuesday()
assertThat(myDate, isTuesday());
public static org.hamcrest.Matcher<Date> isThursday()
assertThat(myDate, isThursday());
public static org.hamcrest.Matcher<Date> isWednesday()
assertThat(myDate, isWednesday());
public static org.hamcrest.Matcher<Date> isFriday()
assertThat(myDate, isFriday());
public static org.hamcrest.Matcher<Date> isSaturday()
assertThat(myDate, isSaturday());
public static org.hamcrest.Matcher<Date> isSunday()
assertThat(myDate, isSunday());
public static org.hamcrest.Matcher<Date> isWeekday()
assertThat(myDate, isWeekday());
public static org.hamcrest.Matcher<Date> isWeekend()
assertThat(myDate, isWeekend());
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.