File Comparators
Plain File Comparator
var comparator = PlainFileComparator.Create(myFilepath1, myFilepath2);
// Performing a custom assertion over the comparator instance.
comparator.Compare().Validate(result => result);comparator.ResultsInOutput = true; // This setting is "false" by default.
comparator.ResultType = PlainComparisonResult.PrettyHtml;
comparator.Compare();XML File Comparator
var comparator = new XmlFileComparator(expectedXmlPath, actualXmlPath)
{
ResultsInOutput = true,
XPathsInDescriptions = true,
};
comparator.CompareExcludingNodesByXPath("/Document/Parents").Validate(result => result);
comparator.CompareNodesByXPath("//Name", "//Priority", "//Goods").Validate(result => !result);Last updated
Was this helpful?