An assertions applicable to exceptions, see assertThatException().

no subtypes hierarchy

Initializer
ExceptionAssert(Throwable exception)
Parameters:
  • exception

    The exception to be checked.

Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
hasMessageshared ExceptionAssert hasMessage(String|Boolean(String) messageCondition)

Verifies that the actual exception has expected message.

Parameters:
  • messageCondition

    The expected message or message predicate.

Throws
  • AssertionError

    When exception hasn't expected message.

hasNoCauseshared ExceptionAssert hasNoCause()

Verifies that the actual exception does not have a cause.

Throws
  • AssertionError

    When exception has some cause.

hasTypeshared ExceptionAssert hasType(Class<Throwable,Nothing>|Boolean(ClassModel<Throwable,Nothing>) typeCondition)

Verifies that the actual exception has expected type.

Parameters:
  • typeCondition

    The expected type or type predicate.

Throws
  • AssertionError

    When exception hasn't expected type.

Inherited Methods
Methods inherited from: Object
equals