@Test public void test() throws Exception { assertThat(onDayOfYear(10), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180110T010001Z")), mismatches(DateTime.parse("20180111T005959Z"), "day of year was <11>"), mismatches(DateTime.parse("20180109T010000Z"), "day of year was <9>"), describesAs("day of year (<10>)") )); assertThat(onDayOfYear(1, 8, 365), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180101T010001Z")), matches(DateTime.parse("20180108T010002Z")), matches(DateTime.parse("20181231T010003Z")), mismatches(DateTime.parse("20180102T005959Z"), "day of year was <2>"), mismatches(DateTime.parse("20180107T005959Z"), "day of year was <7>"), mismatches(DateTime.parse("20180109T005959Z"), "day of year was <9>"), mismatches(DateTime.parse("20180228T005958Z"), "day of year was <59>"), mismatches(DateTime.parse("20181230T005957Z"), "day of year was <364>"), describesAs("day of year (<1> or <8> or <365>)") )); }
public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); }
DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } }
DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } DayOfYearMatcher(Matcher<Integer> subMatcher); }
DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } DayOfYearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher); static Matcher<DateTime> onDayOfYear(Integer... days); }
DayOfYearMatcher extends FeatureMatcher<DateTime, Integer> { public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher) { return new DayOfYearMatcher(dayMatcher); } DayOfYearMatcher(Matcher<Integer> subMatcher); static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher); static Matcher<DateTime> onDayOfYear(Integer... days);  }