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

public Class ShouldHaveCauseExactlyInstance

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 cause exactly 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
ShouldHaveCauseExactlyInstance(Throwable actual, Class<? extends Throwable> expectedCauseType)

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

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

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

Creates a new BasicErrorMessageFactory.

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

Constructor Detail

ShouldHaveCauseExactlyInstanceback to summary
private ShouldHaveCauseExactlyInstance(Throwable actual, Class<? extends Throwable> expectedCauseType)
ShouldHaveCauseExactlyInstanceback to summary
private ShouldHaveCauseExactlyInstance(Class<? extends Throwable> expectedCauseType, Throwable actual)

Method Detail

shouldHaveCauseExactlyInstanceback to summary
public static ErrorMessageFactory shouldHaveCauseExactlyInstance(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 instance.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.