AssertionError messages not parsed by IntelliJ

Open
#90 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
testing

Research direction

Locate the default assertion-error message templates used by the generator and compare their current multiline format with the IntelliJ-compatible single-line example in the issue. Update the formatting so IntelliJ and Eclipse can parse diffs while preserving the reported field, expected value, and actual value; verify the generated messages in the relevant test coverage.

Written by the indexing model from the issue text.

Description

The current error messages as defined in the default templates are not is a form that IntelliJ parses for diffs:

Expecting someField of:
  <SomeObject>
to be:
  <expected>
but was:
  <actual>

With a slight tweak IntelliJ does parse them and allows you to view the diff:

someField of <SomeObject> expected:<expected> but was:<actual>

I believe Eclipse works the same way. Of course, this might be a bit less nice to read as plain text.

@joel-costigliola Is this something you have considered? Would you accept a pull request for this change?

Dominant language
Java
Stars
72
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from assertj/assertj-generator

All issues in assertj/assertj-generator

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.