Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase abstractassert test coverage #2527

Conversation

sarajuhosova
Copy link
Contributor

Check List:

  • Fixes: NA
  • Unit tests : YES
  • Javadoc with a code example (on API only) : NA
  • PR meets the contributing guidelines: NA

Following the contributing guidelines will make it easier for us to review and accept your PR.

@github-actions
Copy link

Looks good. No mutations were possible for these changes.
See https://pitest.org/

Copy link
Member

@joel-costigliola joel-costigliola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot @sarajuhosova for this great PR.
I have a few comments that are mainly stylistic and for simplifying the code a bit more.

// THEN
List<Throwable> errorsCollected = softly.errorsCollected();
assertThat(errorsCollected).hasSize(1);
assertThat(errorsCollected.get(0)).hasMessageStartingWith("IllegalArgumentException should have been thrown");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify the assertion with singleElement()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to refactor the other tests in this file too ;-)

@joel-costigliola joel-costigliola added this to the 3.23.0 milestone Mar 19, 2022
@sarajuhosova
Copy link
Contributor Author

sarajuhosova commented Mar 19, 2022

Thanks, @joel-costigliola, for the feedback, I'll fix the style issues asap. I was also planning to add tests for the more complex classes that I've left out for now, should I add it to this PR or make a new one to make reviewing a bit easier?

@joel-costigliola
Copy link
Member

thanks for the quick reply, I would prefer another PR so that we can finish this one and it's easier to review shorter PRs.

@sarajuhosova
Copy link
Contributor Author

I've fixed the commented things, hopefully this is what you meant!

@sarajuhosova sarajuhosova marked this pull request as ready for review March 19, 2022 10:13
@github-actions
Copy link

Looks good. No mutations were possible for these changes.
See https://pitest.org/

@joel-costigliola
Copy link
Member

Integrated thanks @sarajuhosova!
I noticed when integrating some unused imports or * imports and I tool the liberty to reformat other tests not initially in the PR and squashed all the commits (keeping you as the commit author obviously)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants