Class TestExecutionResultConditions
- java.lang.Object
-
- org.junit.platform.testkit.engine.TestExecutionResultConditions
-
@API(status=EXPERIMENTAL, since="1.4") public final class TestExecutionResultConditions extends Object
Collection of AssertJ conditions forTestExecutionResult
.- Since:
- 1.4
- See Also:
EventConditions
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Condition<Throwable>
cause(Condition<Throwable> condition)
static Condition<Throwable>
instanceOf(Class<? extends Throwable> expectedType)
Create a newCondition
that matches if and only if aThrowable
is an instance of the suppliedClass
.static Condition<Throwable>
message(String expectedMessage)
static Condition<Throwable>
message(Predicate<String> expectedMessagePredicate)
static Condition<TestExecutionResult>
status(TestExecutionResult.Status expectedStatus)
Create a newCondition
that matches if and only if aTestExecutionResult
's status is equal to the suppliedStatus
.static Condition<Throwable>
suppressed(int index, Condition<Throwable> condition)
Create a newCondition
that matches if and only if aThrowable
's suppressed throwable at the supplied index matches the suppliedCondition
.static Condition<TestExecutionResult>
throwable(Condition<? super Throwable> condition)
Create a newCondition
that matches if and only if aTestExecutionResult
's throwable matches the suppliedCondition
.
-
-
-
Method Detail
-
status
public static Condition<TestExecutionResult> status(TestExecutionResult.Status expectedStatus)
Create a newCondition
that matches if and only if aTestExecutionResult
's status is equal to the suppliedStatus
.
-
throwable
public static Condition<TestExecutionResult> throwable(Condition<? super Throwable> condition)
Create a newCondition
that matches if and only if aTestExecutionResult
's throwable matches the suppliedCondition
.
-
suppressed
public static Condition<Throwable> suppressed(int index, Condition<Throwable> condition)
Create a newCondition
that matches if and only if aThrowable
's suppressed throwable at the supplied index matches the suppliedCondition
.
-
instanceOf
public static Condition<Throwable> instanceOf(Class<? extends Throwable> expectedType)
Create a newCondition
that matches if and only if aThrowable
is an instance of the suppliedClass
.
-
-