-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
At the moment there is only one constructor available for Comparsion class:
public Comparison(ComparisonType t,
Node controlTarget, String controlXPath, Object controlValue, String controlParentXPath,
Node testTarget, String testXPath, Object testValue, String testParentXPath) {
And this is being used extensively throughout the DOMDifferenceEngine
class, however given the fact there are 9 arguments in total for the constructor and this being called multiple times.
It's causing readability on my opinion when I tried to understand the logic of DOMDifferenceEngine
.
Hence I'm proposing instead of reading controlXPath
and controlParentXPath
in separately in String form, we can actually create another constructor as the wrapper to produce these two values from a given XPathContext
instance, since both are derived fields.
The objective of this issue / PR is to create constructor similar to the following:
public Comparison(ComparisonType t,
XPathContext controlContext, Node controlTarget, Object controlValue,
XPathContext testContext, Node testTarget, Object testValue) {
Metadata
Metadata
Assignees
Labels
No labels