T - Type of the scalar's valuepublic final class MatchesBefore<T> extends MatcherEnvelope<T>
Matcher alternative to JUnit's Test#timeout.
Here is an example how MatchesBefore can be used:
new Assertion<>(
"must run in 5 seconds maximum",
new TextOf("test"),
new MatchesBefore(
5000,
new TextIs("test")
)
).affirm();| Constructor and Description |
|---|
MatchesBefore(long millisec,
org.hamcrest.Matcher<T> matcher)
Ctor.
|
describeMismatchSafely, describeTo, matchesSafelypublic MatchesBefore(long millisec,
org.hamcrest.Matcher<T> matcher)
millisec - Timeout.matcher - Matcher.Copyright © 2017–2019 jcabi.com. All rights reserved.