Constructor and Description |
---|
DurationMatcher(Duration target,
Duration margin) |
Modifier and Type | Method and Description |
---|---|
static DurationMatcher |
closeTo(Duration target)
Matcher that asserts that a duration is within 100ms of
target |
static DurationMatcher |
closeTo(Duration target,
Duration margin)
Matcher that asserts that a duration is within
margin of target |
void |
describeTo(org.hamcrest.Description description) |
protected boolean |
matchesSafely(Duration item,
org.hamcrest.Description mismatchDescription) |
public void describeTo(org.hamcrest.Description description)
protected boolean matchesSafely(Duration item, org.hamcrest.Description mismatchDescription)
matchesSafely
in class org.hamcrest.TypeSafeDiagnosingMatcher<Duration>
public static DurationMatcher closeTo(Duration target, Duration margin)
margin
of target
target
- the target durationmargin
- the marginpublic static DurationMatcher closeTo(Duration target)
target
target
- the target durationCopyright © 2020 Eclipse Foundation. All rights reserved.