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

Use actual and expected in the order that is expected by AssertJ #28600

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

floscher
Copy link
Contributor

@floscher floscher commented Feb 1, 2025

This mainly corrects the error messages in case of test failures, where currently the actual value is showing as the expected value and vice versa.

assertThat() takes the actual value as parameter instead of the expected value, see https://www.javadoc.io/doc/org.assertj/assertj-core/latest/org/assertj/core/api/Assertions.html#assertThat(boolean)

Currently it looks like this, when for example the conversion from entity to dto and back is broken and a field is not the expected "expectedValue", but null instead:
image


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

This mainly corrects the error messages in case of test failures, where currently the actual value is showing as the expected value and vice versa.

assertThat() takes the actual value as parameter instead of the expected value, see https://www.javadoc.io/doc/org.assertj/assertj-core/latest/org/assertj/core/api/Assertions.html#assertThat(boolean)
@CLAassistant
Copy link

CLAassistant commented Feb 1, 2025

CLA assistant check
All committers have signed the CLA.

@mshima mshima merged commit f3b8eac into jhipster:main Feb 4, 2025
65 checks passed
@floscher floscher deleted the assertj-switch-actual-expected branch February 4, 2025 08:03
@mraible mraible added this to the 8.9.0 milestone Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants