Class TestExecutionResultConditions
- java.lang.Object
-
- org.junit.platform.testkit.engine.TestExecutionResultConditions
-
@API(status=MAINTAINED, since="1.7") public final class TestExecutionResultConditions extends java.lang.ObjectCollection of AssertJ conditions forTestExecutionResult.- Since:
- 1.4
- See Also:
EventConditions
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTestExecutionResultConditions()
-
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 newConditionthat matches if and only if aThrowable's cause matches all supplied conditions.private static java.lang.ThrowablegetRootCause(java.lang.Throwable throwable, java.util.List<java.lang.Throwable> causeChain)Get the root cause of the suppliedThrowable, or the suppliedThrowableif it has no cause.static org.assertj.core.api.Condition<java.lang.Throwable>instanceOf(java.lang.Class<? extends java.lang.Throwable> expectedType)Create a newConditionthat matches if and only if aThrowableis an instance of the suppliedClass.static org.assertj.core.api.Condition<java.lang.Throwable>message(java.lang.String expectedMessage)Create a newConditionthat 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 newConditionthat matches if and only if aThrowable's message matches the suppliedPredicate.private static org.assertj.core.api.Condition<java.lang.Throwable>rootCause(org.assertj.core.api.Condition<java.lang.Throwable> condition)static org.assertj.core.api.Condition<java.lang.Throwable>rootCause(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)Create a newConditionthat matches if and only if aThrowable's root cause matches all supplied conditions.static org.assertj.core.api.Condition<TestExecutionResult>status(TestExecutionResult.Status expectedStatus)Create a newConditionthat 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 newConditionthat 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 newConditionthat 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 newConditionthat 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 newConditionthat 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 newConditionthat matches if and only if aThrowable's cause matches all supplied conditions.
-
rootCause
@API(status=MAINTAINED, since="1.13.3") @SafeVarargs public static org.assertj.core.api.Condition<java.lang.Throwable> rootCause(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)Create a newConditionthat matches if and only if aThrowable's root cause matches all supplied conditions.- Since:
- 1.11
- See Also:
cause(Condition...),suppressed(int, Condition...)
-
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 newConditionthat matches if and only if aThrowable's suppressed throwable at the supplied index matches all supplied conditions.- See Also:
cause(Condition...),rootCause(Condition...)
-
instanceOf
public static org.assertj.core.api.Condition<java.lang.Throwable> instanceOf(java.lang.Class<? extends java.lang.Throwable> expectedType)
Create a newConditionthat matches if and only if aThrowableis an instance of the suppliedClass.
-
message
public static org.assertj.core.api.Condition<java.lang.Throwable> message(java.lang.String expectedMessage)
Create a newConditionthat 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 newConditionthat 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)
-
rootCause
private static org.assertj.core.api.Condition<java.lang.Throwable> rootCause(org.assertj.core.api.Condition<java.lang.Throwable> condition)
-
getRootCause
private static java.lang.Throwable getRootCause(java.lang.Throwable throwable, java.util.List<java.lang.Throwable> causeChain)Get the root cause of the suppliedThrowable, or the suppliedThrowableif it has no cause.
-
suppressed
private static org.assertj.core.api.Condition<java.lang.Throwable> suppressed(int index, org.assertj.core.api.Condition<java.lang.Throwable> condition)
-
-