@API(status=STABLE,
since="1.0")
public class Assume
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
that(boolean condition)
If condition does not hold, the current property method will be aborted,
i.e., it will not be executed but not counted as a try.
|
static void |
that(java.util.function.Supplier<java.lang.Boolean> conditionSupplier)
If condition provided by conditionSupplier does not hold, the current property method will be aborted,
i.e., it will not be executed but not counted as a try.
|
public static void that(boolean condition)
Assumptions are typically positioned at the beginning of a property method.
A failing assumption in an example test (annotated with Example or having a single try) will be reported as a skipped test.
condition
- Condition to make the assumption truepublic static void that(java.util.function.Supplier<java.lang.Boolean> conditionSupplier)
Assumptions are typically positioned at the beginning of a property method.
conditionSupplier
- supplier for condition to make assumption true