Class TestExecutionResultConditions

java.lang.Object
org.junit.platform.testkit.engine.TestExecutionResultConditions

@API(status=MAINTAINED, since="1.7") public final class TestExecutionResultConditions extends Object
Collection of AssertJ conditions for TestExecutionResult.
Since:
1.4
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.assertj.core.api.Condition<Throwable>
    cause(org.assertj.core.api.Condition<Throwable>... conditions)
    Create a new Condition that matches if and only if a Throwable's cause matches all supplied conditions.
    static org.assertj.core.api.Condition<Throwable>
    instanceOf(Class<? extends Throwable> expectedType)
    Create a new Condition that matches if and only if a Throwable is an instance of the supplied Class.
    static org.assertj.core.api.Condition<Throwable>
    message(String expectedMessage)
    Create a new Condition that matches if and only if a Throwable's message is equal to the supplied String.
    static org.assertj.core.api.Condition<Throwable>
    message(Predicate<String> expectedMessagePredicate)
    Create a new Condition that matches if and only if a Throwable's message matches the supplied Predicate.
    static org.assertj.core.api.Condition<org.junit.platform.engine.TestExecutionResult>
    status(org.junit.platform.engine.TestExecutionResult.Status expectedStatus)
    Create a new Condition that matches if and only if a TestExecutionResult's status is equal to the supplied Status.
    static org.assertj.core.api.Condition<Throwable>
    suppressed(int index, org.assertj.core.api.Condition<Throwable>... conditions)
    Create a new Condition that matches if and only if a Throwable's suppressed throwable at the supplied index matches all supplied conditions.
    static org.assertj.core.api.Condition<org.junit.platform.engine.TestExecutionResult>
    throwable(org.assertj.core.api.Condition<Throwable>... conditions)
    Create a new Condition that matches if and only if a TestExecutionResult's throwable matches all supplied conditions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • status

      public static org.assertj.core.api.Condition<org.junit.platform.engine.TestExecutionResult> status(org.junit.platform.engine.TestExecutionResult.Status expectedStatus)
      Create a new Condition that matches if and only if a TestExecutionResult's status is equal to the supplied Status.
    • throwable

      @SafeVarargs public static org.assertj.core.api.Condition<org.junit.platform.engine.TestExecutionResult> throwable(org.assertj.core.api.Condition<Throwable>... conditions)
      Create a new Condition that matches if and only if a TestExecutionResult's throwable matches all supplied conditions.
    • cause

      @SafeVarargs public static org.assertj.core.api.Condition<Throwable> cause(org.assertj.core.api.Condition<Throwable>... conditions)
      Create a new Condition that matches if and only if a Throwable's cause matches all supplied conditions.
    • suppressed

      @SafeVarargs public static org.assertj.core.api.Condition<Throwable> suppressed(int index, org.assertj.core.api.Condition<Throwable>... conditions)
      Create a new Condition that matches if and only if a Throwable's suppressed throwable at the supplied index matches all supplied conditions.
    • instanceOf

      public static org.assertj.core.api.Condition<Throwable> instanceOf(Class<? extends Throwable> expectedType)
      Create a new Condition that matches if and only if a Throwable is an instance of the supplied Class.
    • message

      public static org.assertj.core.api.Condition<Throwable> message(String expectedMessage)
      Create a new Condition that matches if and only if a Throwable's message is equal to the supplied String.
    • message

      public static org.assertj.core.api.Condition<Throwable> message(Predicate<String> expectedMessagePredicate)
      Create a new Condition that matches if and only if a Throwable's message matches the supplied Predicate.