Skip to content

Ignoring the sequence of child nodes doesn't work #34

@amonich

Description

@amonich

I am getting 4 differences in this piece of code. Although I hope to get that they are identical

var xml1 = "<A><B>1</B><C>2</C></A>";
var xml2 = "<A><C>2</C><B>1</B></A>";

var source1 = Input.FromString(xml1).Build();
var source2 = Input.FromString(xml2).Build();

var diff = DiffBuilder
	.Compare(source1)
	.WithTest(source2)
	.WithDifferenceEvaluator(DifferenceEvaluators.Chain(
		DifferenceEvaluators.Default,
		DifferenceEvaluators.DowngradeDifferencesToSimilar(ComparisonType.CHILD_NODELIST_SEQUENCE)))
	.CheckForSimilar()
	.Build();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions