Top Fields Constructors Methods
org.assertj.core.configuration

public sealed Enum PreferredAssumptionException

extends Enum<PreferredAssumptionException>
Class Inheritance
Static Imports
java.lang.String.format

Field Summary

Modifier and TypeField and Description
private final String
public static final PreferredAssumptionException
AUTO_DETECT

AssertJ will try to build the exception to throw in this order:

  1. org.testng.SkipException for TestNG (if available in the classpath)
  2. org.junit.AssumptionViolatedException for JUnit 4 (if available in the classpath)
  3. org.opentest4j.TestAbortedException for JUnit 5
public static final PreferredAssumptionException
JUNIT4

org.junit.AssumptionViolatedException - works with JUnit 4

public static final PreferredAssumptionException
JUNIT5

org.opentest4j.TestAbortedException - works with JUnit 5

public static final PreferredAssumptionException
TEST_NG

org.testng.SkipException - works with TestNG

Constructor Summary

AccessConstructor and Description
private
PreferredAssumptionException(String assumptionExceptionClassName)

Method Summary

Modifier and TypeMethod and Description
private IllegalStateException
public Class<?>
private Optional<Class<?>>
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static PreferredAssumptionException
public static PreferredAssumptionException[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

assumptionExceptionClassNameback to summary
private final String assumptionExceptionClassName
AUTO_DETECTback to summary
public static final PreferredAssumptionException AUTO_DETECT

AssertJ will try to build the exception to throw in this order:

  1. org.testng.SkipException for TestNG (if available in the classpath)
  2. org.junit.AssumptionViolatedException for JUnit 4 (if available in the classpath)
  3. org.opentest4j.TestAbortedException for JUnit 5
If none are available, AssertJ throws an IllegalStateException.
JUNIT4back to summary
public static final PreferredAssumptionException JUNIT4

org.junit.AssumptionViolatedException - works with JUnit 4

JUNIT5back to summary
public static final PreferredAssumptionException JUNIT5

org.opentest4j.TestAbortedException - works with JUnit 5

TEST_NGback to summary
public static final PreferredAssumptionException TEST_NG

org.testng.SkipException - works with TestNG

Constructor Detail

PreferredAssumptionExceptionback to summary
private PreferredAssumptionException(String assumptionExceptionClassName)

Method Detail

assumptionExceptionClassNotFoundback to summary
private IllegalStateException assumptionExceptionClassNotFound()
getAssumptionExceptionClassback to summary
public Class<?> getAssumptionExceptionClass()
loadAssumptionExceptionClassback to summary
private Optional<Class<?>> loadAssumptionExceptionClass()
toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static PreferredAssumptionException valueOf(String name)
valuesback to summary
public static PreferredAssumptionException[] values()