Use actual
and expected
in the order that is expected by AssertJ
#28600
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
![image](https://private-user-images.githubusercontent.com/3904348/408800029-43411224-30a1-4408-bad2-8b8be5a76700.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODU4OTIsIm5iZiI6MTczOTU4NTU5MiwicGF0aCI6Ii8zOTA0MzQ4LzQwODgwMDAyOS00MzQxMTIyNC0zMGExLTQ0MDgtYmFkMi04YjhiZTVhNzY3MDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDIxMzEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzJmYzViMjU1NzZjOTM5OWVmOTA0NjkyOTIzNTZkMDllNjViOWUwZGE2YmYzNjJhZWIyMTY2OWQyYmExMjFkNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.sPLYzpzG81pM8Oh13DgPzj38DvBq-tJwMxO1PcmDAyA)
"expectedValue"
, butnull
instead: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.