Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldHaveRootCauseInstance

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
org.assertj.core.util.Strings.escapePercent, .Throwables.getStackTrace

Creates an error message indicating that an assertion that verifies that a Throwable have a root cause instance of a certain type.
Author
Jean-Christophe Gay

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldHaveRootCauseInstance(Throwable actual, Class<? extends Throwable> expectedCauseType)

private
ShouldHaveRootCauseInstance(Class<? extends Throwable> expectedCauseType, Throwable actual)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveRootCauseInstance
(Throwable
the actual value in the failed assertion.
actual
,
Class<? extends Throwable>
the expected cause type.
expectedCauseType
)

Creates a new BasicErrorMessageFactory.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldHaveRootCauseInstanceback to summary
private ShouldHaveRootCauseInstance(Throwable actual, Class<? extends Throwable> expectedCauseType)
ShouldHaveRootCauseInstanceback to summary
private ShouldHaveRootCauseInstance(Class<? extends Throwable> expectedCauseType, Throwable actual)

Method Detail

shouldHaveRootCauseInstanceback to summary
public static ErrorMessageFactory shouldHaveRootCauseInstance(Throwable actual, Class<? extends Throwable> expectedCauseType)

Creates a new BasicErrorMessageFactory.

Parameters
actual:Throwable

the actual value in the failed assertion.

expectedCauseType:Class<? extends Throwable>

the expected cause type.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.