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