Class ShouldHaveRootCauseExactlyInstance

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldHaveRootCauseExactlyInstance
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a Throwable have a root cause exactly instance of a certain type.
    • Constructor Detail

      • ShouldHaveRootCauseExactlyInstance

        private ShouldHaveRootCauseExactlyInstance​(java.lang.Throwable actual,
                                                   java.lang.Class<? extends java.lang.Throwable> expectedCauseType)
      • ShouldHaveRootCauseExactlyInstance

        private ShouldHaveRootCauseExactlyInstance​(java.lang.Class<? extends java.lang.Throwable> expectedCauseType,
                                                   java.lang.Throwable actual)
    • Method Detail

      • shouldHaveRootCauseExactlyInstance

        public static ErrorMessageFactory shouldHaveRootCauseExactlyInstance​(java.lang.Throwable actual,
                                                                             java.lang.Class<? extends java.lang.Throwable> expectedCauseType)
        Parameters:
        actual - the actual value in the failed assertion.
        expectedCauseType - the expected cause instance.
        Returns:
        the created ErrorMessageFactory.