Skip to content

Assertions error messages should be multiline for better readability #1

Closed
@joel-costigliola

Description

@joel-costigliola
Member

Some assertions error message are single line which is not very handy in IDE, one must often copy the message in a text editor and reformat it to read it easily.

Let's take the failing assertion below :

Date date = parse("2002-12-18");
assertThat(date).isBefore("2002-12-10");

It leads to an assertion error with the following message in Eclipse :

java.lang.AssertionError: expected:<2002-12-18T00:00:00> to be strictly before:<2002-12-10T00:00:00>

But it would be more readable if it were multiline like this :

java.lang.AssertionError: 
expected:
  <2002-12-18T00:00:00> 
to be strictly before:
  <2002-12-10T00:00:00>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @joel-costigliola

        Issue actions

          Assertions error messages should be multiline for better readability · Issue #1 · assertj/assertj