T - the type of the value which will be verifiedpublic interface Condition<T>
| Modifier and Type | Method and Description |
|---|---|
void |
assertEquals(T expected)
Assert that the condition evaluates to the expected value within a given time.
|
void |
assertThat(org.hamcrest.Matcher<? super T> matcher)
Uses
Matcher to assert that a condition is met in time. |
void |
assumeEquals(T expected)
Assumes that the condition evaluates to the expected value within a given time.
|
void |
assumeThat(org.hamcrest.Matcher<? super T> matcher)
Uses
Matcher to assume that a condition is met in time. |
T |
await()
Retrieve the result of the condition as soon as it is evaluated without any exception.
|
T |
await(org.hamcrest.Matcher<? super T> matcher)
Wait for the condition value until it fulfills the given matcher and return it.
|
T |
get()
Conditions need to implement this method to return the value
which will be checked.
|
void |
waitUntil(org.hamcrest.Matcher<? super T> matcher)
Uses
Matcher to wait until a condition is met in time. |
void |
waitUntilEquals(T expected)
Wait until the condition evaluates to the expected value within a given time.
|
Condition<T> |
withMessage(String message)
The message to print on failure.
|
Condition<T> |
withTimeoutFactor(double factor)
Sets a factor to speed up or slow down tests.
|
T get()
ExpressionEvaluationException - when the actual value cannot be evaluated. Consider calling any of the
await or assume methods to wait for the value to
become available.Expression.get()T await()
Retrieve the result of the condition as soon as it is evaluated without any exception.
WaitTimeoutException - if a value could not be retrieved in timeT await(@Nonnull org.hamcrest.Matcher<? super T> matcher)
Wait for the condition value until it fulfills the given matcher and return it.
matcher - matcher to useWaitTimeoutException - if a value could not be retrieved in timevoid assumeEquals(@Nullable T expected)
Assumes that the condition evaluates to the expected value within a given time.
expected - expected valuevoid assumeThat(@Nonnull org.hamcrest.Matcher<? super T> matcher)
Matcher to assume that a condition is met in time.matcher - the matcher to usevoid assertEquals(@Nullable T expected)
Assert that the condition evaluates to the expected value within a given time.
expected - expected valuevoid assertThat(@Nonnull org.hamcrest.Matcher<? super T> matcher)
Matcher to assert that a condition is met in time.matcher - the matcher to usevoid waitUntilEquals(@Nullable T expected)
Wait until the condition evaluates to the expected value within a given time.
expected - expected valuevoid waitUntil(@Nonnull org.hamcrest.Matcher<? super T> matcher)
Matcher to wait until a condition is met in time.matcher - the matcher to use@Nonnull Condition<T> withTimeoutFactor(@Nonnegative double factor)
factor - factor by which to increase the timeout for this conditionCopyright © 2011-2017 CoreMedia AG. All Rights Reserved.