-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
it's have bug that will navigate to wrong child when apply node filter
in Org.XmlUnit.Diff
DOMDifferenceEngine
function
UnmatchedControlNodes
and
UnmatchedTestNodes
the problem is that NavigateToChild was passed by index of List
that was filtered out
it must get correct index before pass to NavigateToChild
may be add something like
Array.IndexOf(testList[i].ParentNode.ChildNodes.Cast().ToArray(),testList[i])
bug example
var aa= DiffBuilder.Compare("<Document><Section><Binding /><Binding /><Finding /><Finding /><Finding /><Finding /><Finding /><Finding /><Finding /></Section></Document>")
.WithTest("<Document><Section><Binding /><Binding /><Finding /><Finding /><Finding /><Finding /><Finding /><Finding /></Section></Document>")
.IgnoreWhitespace()
.WithNodeFilter(node => "Document,Section,Finding".Split(',').Contains(node.Name))
.WithNodeMatcher(new DefaultNodeMatcher(ElementSelectors.ByNameAndText)).Build();