@Test public void test() throws Exception { assertThat(before(DateTime.parse("20180101T010000Z")), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180101T000059Z")), mismatches(DateTime.parse("20180101T010001Z"), "not before 20180101T010000Z"), mismatches(DateTime.parse("20180101T010000Z"), "not before 20180101T010000Z"), describesAs("before 20180101T010000Z") )); assertThat(before("20180101T010000Z"), AllOf.<Matcher<DateTime>>allOf( matches(DateTime.parse("20180101T000059Z")), mismatches(DateTime.parse("20180101T010001Z"), "not before 20180101T010000Z"), mismatches(DateTime.parse("20180101T010000Z"), "not before 20180101T010000Z"), describesAs("before 20180101T010000Z") )); }
public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); }
BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } }
BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } BeforeMatcher(DateTime referenceDate); }
BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } BeforeMatcher(DateTime referenceDate); static Matcher<DateTime> before(String dateTime); static Matcher<DateTime> before(DateTime dateTime); @Override void describeTo(Description description); }
BeforeMatcher extends TypeSafeDiagnosingMatcher<DateTime> { public static Matcher<DateTime> before(String dateTime) { return before(DateTime.parse(dateTime)); } BeforeMatcher(DateTime referenceDate); static Matcher<DateTime> before(String dateTime); static Matcher<DateTime> before(DateTime dateTime); @Override void describeTo(Description description);  }