Firstly, this is not a duplicate of this question. There, it is asked specifically for an object. I want to do this for a Container, specifically a List.
So, I know I can ignore a field when using
usingElementComparatorIgnoringFields()
But this won't do a recursive comparison.
I know I can use usingRecursiveFieldByFieldElementComparator()
. But this will not allow me to exclude a given field.
How can I compare recursively, ignoring a field?
this is going to be in the next AssertJ Core version: https://github.com/joel-costigliola/assertj-core/issues/1002