Class ShouldHaveMessage

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldHaveMessage
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a Throwable have certain message failed.
    Author:
    Joel Costigliola
    • Method Detail

      • shouldHaveMessage

        public static ErrorMessageFactory shouldHaveMessage​(java.lang.Throwable actual,
                                                            java.lang.String expectedMessage)
        Creates a new ShouldHaveMessage.
        Parameters:
        actual - the actual Throwable in the failed assertion.
        expectedMessage - the expected message of actual Throwable.
        Returns:
        the created ErrorMessageFactory.