Skip to content

Improve message of Assertions.assertDoesNotThrow #1703

Closed

Description

Here, https://github.com/junit-team/junit5/blob/master/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java#L51-L52 and here https://github.com/junit-team/junit5/blob/master/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java#L74-L75 only the t.getClass().getName() from the unexpected throwable is added to the message of the created AssertionFailedError instance. The message should also contain the t.getMessage() text from the unexpected throwable.

Deliverables

  • Attach non-empty message from the unexpected throwable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions