Hello,
In the case of a ComparisonType.CHILD_LOOKUP difference currently one of Comparison#control or Comparison#test has all details (target, xPath, value) "null".
For a merge (or when one wants to visualize differences) it would be nice to know the parent of the "other" side.
So I would suggest to extend Comparison.Detail with a
getParentXPath() method.
and make sure that this does return a non-null value (for all cases where a parent exists).
Note that one cannot use the available xpath from control/test, since on the "other" side the path might be different (e.g. when nodes in a list are not matched by index).
I can provide a pull request for this issue ... just wanted to discuss the solution as I did not dig that deep into this tool. Are there any other better/simpler solutions for this issue?
Thanks, Erwin
Hello,
In the case of a ComparisonType.CHILD_LOOKUP difference currently one of Comparison#control or Comparison#test has all details (target, xPath, value) "null".
For a merge (or when one wants to visualize differences) it would be nice to know the parent of the "other" side.
So I would suggest to extend Comparison.Detail with a
getParentXPath() method.
and make sure that this does return a non-null value (for all cases where a parent exists).
Note that one cannot use the available xpath from control/test, since on the "other" side the path might be different (e.g. when nodes in a list are not matched by index).
I can provide a pull request for this issue ... just wanted to discuss the solution as I did not dig that deep into this tool. Are there any other better/simpler solutions for this issue?
Thanks, Erwin