Class DurationMatcher
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<Duration>
org.eclipse.microprofile.fault.tolerance.tck.util.DurationMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<Duration>
,org.hamcrest.SelfDescribing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DurationMatcher
Matcher that asserts that a duration is within 100ms oftarget
static DurationMatcher
Matcher that asserts that a duration is withinmargin
oftarget
void
describeTo
(org.hamcrest.Description description) protected boolean
matchesSafely
(Duration item, org.hamcrest.Description mismatchDescription) Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matches
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
-
Constructor Details
-
DurationMatcher
-
-
Method Details
-
describeTo
public void describeTo(org.hamcrest.Description description) -
matchesSafely
- Specified by:
matchesSafely
in classorg.hamcrest.TypeSafeDiagnosingMatcher<Duration>
-
closeTo
Matcher that asserts that a duration is withinmargin
oftarget
- Parameters:
target
- the target durationmargin
- the margin- Returns:
- the matcher
-
closeTo
Matcher that asserts that a duration is within 100ms oftarget
- Parameters:
target
- the target duration- Returns:
- the matcher
-