public final class Conditions extends Object
Constructor and Description |
---|
Conditions() |
Modifier and Type | Method and Description |
---|---|
static <T> SelfDescribingCondition |
assertion(Callable<T,RuntimeException> actual,
org.hamcrest.Matcher<T> matcher) |
static <T> Condition |
assertion(T actual,
org.hamcrest.Matcher<T> matcher)
Deprecated.
|
static void |
assertThat(Condition condition,
org.hamcrest.Matcher<Boolean> booleanMatcher) |
static void |
assertThat(String message,
Condition condition,
org.hamcrest.Matcher<Boolean> booleanMatcher) |
static Condition |
is(Thread thread,
Thread.State state) |
static Condition |
isAlive(Thread thread) |
static Condition |
isWaiting(Thread thread) |
static Condition |
not(Condition condition) |
static Condition |
shutdown(ExecutorService service) |
public static Condition shutdown(ExecutorService service)
public static Condition is(Thread thread, Thread.State state)
public static void assertThat(Condition condition, org.hamcrest.Matcher<Boolean> booleanMatcher)
public static void assertThat(String message, Condition condition, org.hamcrest.Matcher<Boolean> booleanMatcher)
@Deprecated public static <T> Condition assertion(T actual, org.hamcrest.Matcher<T> matcher)
assertion(com.google.code.tempusfugit.concurrency.Callable, org.hamcrest.Matcher)
insteadWaitFor.waitOrTimeout(assertion(limit, is(5)), timeout(millis(500)))
Not that if the actual value isn't updated by some asynchronous code, the matcher may never match so it'd be
pointless calling inside a WaitFor.waitOrTimeout
call.public static <T> SelfDescribingCondition assertion(Callable<T,RuntimeException> actual, org.hamcrest.Matcher<T> matcher)
Copyright © 2009–2019 tempus-fugit committers. All rights reserved.