Add getters for field path in ComparisonDifference - #3007
Conversation
|
Would you have a concrete use case to share? |
|
@scordio I have an application where as a part of regression testing we create a lot of entity objects, and we need to compare them field by field with entities we already have in the system. By the end, we generate an Excel report with differences: I'm trying to use RecursiveComparisonDifferenceCalculator for it, but I can't get field names and their path from the result of comparison. |
|
@aakatov do you need to expose both the |
|
@joel-costigliola I don't need both. I'll keep a getter for |

Check List:
Fixes absense of getters for field path in ComparisonDifference
Unit tests : NA
Javadoc with a code example (on API only) : NA
PR meets the contributing guidelines
org.assertj.core.api.recursive.comparison.ComparisonDifference unnecessery closes access to both decomposedPath and concatenatedPath.
org.assertj.core.api.recursive.comparison.RecursiveComparisonDifferenceCalculator#determineDifferences is a public method but you cannot get a field path from its result. It would be nice to have getters on it to use in an application code.