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

public Class ShouldHaveMessage

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 certain message failed.
Author
Joel Costigliola

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldHaveMessage(Throwable actual, String expectedMessage)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveMessage
(Throwable
the actual Throwable in the failed assertion.
actual
,
String
the expected message of actual Throwable.
expectedMessage
)

Creates a new ShouldHaveMessage.

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

Constructor Detail

ShouldHaveMessageback to summary
private ShouldHaveMessage(Throwable actual, String expectedMessage)

Method Detail

shouldHaveMessageback to summary
public static ErrorMessageFactory shouldHaveMessage(Throwable actual, String expectedMessage)

Creates a new ShouldHaveMessage.

Parameters
actual:Throwable

the actual Throwable in the failed assertion.

expectedMessage:String

the expected message of actual Throwable.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.