Validates that a DateTime
is before or the same moment as date
.
When using this matcher with methods like expectResponse, hasResponse, hasHeaders, hasBody,
the compared value will be parsed into a DateTime
prior to running this matcher.
Source
Matcher isBeforeOrSameMomentAs(DateTime date) { return predicate((DateTime d) => d.isBefore(date) || d == date, "before or same moment as ${date.toIso8601String()}"); }