Open rkarczmarczyk opened 6 years ago
Waiting for release of this fix in AssertJ https://github.com/joel-costigliola/assertj-core/pull/1352/files
Looks like the issue listed above has been merged.
It can not be easily implemented since AssertJ softly proxy does not proxy all our methods like node()
Maybe the new AssertJ features like SoftAssertionsProvider
might be the way
Hello, great library, is there any way to use it with softly assertions?
Hi, unfortunatelly I do not have capacity to implement it. But if you want to try, I welcome PRs.
Ok, thanks for answer.
@rkarczmarczyk Do you happen to know how to make the workaround for an assertion like this?
assertThatJson(stringArray1)
.when(Option.IGNORING_ARRAY_ORDER)
.whenIgnoringPaths("[*].key1", "[*].key2")
.isArray()
.isEqualTo(stringArray2);
EDIT: I figured this out.
At this moment there is no easy way to collect Json asserts in bundle and evaluate it at the end of tests (to show all errors at one test iteration).
There is a way to create custom softly assert but it's not very convenient. You have to do 3 steps:
Create class that extends AbstractAssert