public static class TestEnvironment.Promise<T> extends java.lang.Object
Constructor and Description |
---|
Promise(TestEnvironment env) |
Modifier and Type | Method and Description |
---|---|
void |
complete(T value)
Allows using expectCompletion to await for completion of the value and complete it _then_
|
static <T> TestEnvironment.Promise<T> |
completed(TestEnvironment env,
T value) |
void |
completeImmediatly(T value)
Completes the promise right away, it is not possible to expectCompletion on a Promise completed this way
|
void |
expectCompletion(long timeoutMillis,
java.lang.String errorMsg) |
boolean |
isCompleted() |
T |
value() |
public Promise(TestEnvironment env)
public static <T> TestEnvironment.Promise<T> completed(TestEnvironment env, T value)
public boolean isCompleted()
public void complete(T value)
public void completeImmediatly(T value)
public void expectCompletion(long timeoutMillis, java.lang.String errorMsg) throws java.lang.InterruptedException
java.lang.InterruptedException