isLongerThan function
Matcher
isLongerThan(
{ - int days = 0,
- int hours = 0,
- int minutes = 0,
- int seconds = 0,
- int milliseconds = 0,
- int microseconds = 0,
})
Implementation
Matcher isLongerThan(
{int days = 0,
int hours = 0,
int minutes = 0,
int seconds = 0,
int milliseconds = 0,
int microseconds = 0}) {
final expected = Duration(
days: days,
hours: hours,
minutes: minutes,
seconds: seconds,
milliseconds: milliseconds,
microseconds: microseconds)
.abs();
return matcher('to be longer than <$expected', (item, _) {
assert(item is Duration);
return (item as Duration).compareTo(expected) >= 0;
});
}