[Test] public void DefaultConfiguredWithGenericDescription() { DiffConfiguration diffConfiguration = new DiffConfiguration(); OldAssert.AreEqual(DiffConfiguration.DEFAULT_DESCRIPTION, diffConfiguration.Description); OldAssert.AreEqual(DiffConfiguration.DEFAULT_DESCRIPTION, new XmlDiff("", "").OptionalDescription); }
public XmlDiff(XmlInput control, XmlInput test, DiffConfiguration diffConfiguration) { _diffConfiguration = diffConfiguration; _controlReader = CreateXmlReader(control); if (control.Equals(test)) { _testReader = _controlReader; } else { _testReader = CreateXmlReader(test); } }
public void CanConfigureWhitespaceHandlingSignificant() { DiffConfiguration xmlUnitConfiguration = new DiffConfiguration (WhitespaceHandling.Significant); PerformAssertion(xmlWithoutWhitespace, xmlWithWhitespaceElement, true, xmlUnitConfiguration); PerformAssertion(xmlWithoutWhitespace, xmlWithoutWhitespaceElement, true, xmlUnitConfiguration); PerformAssertion(xmlWithoutWhitespace, xmlWithWhitespace, true, xmlUnitConfiguration); PerformAssertion(xmlWithoutWhitespaceElement, xmlWithWhitespaceElement, true, xmlUnitConfiguration); }
private void PerformAssertion(string control, string test, bool assertion, DiffConfiguration xmlUnitConfiguration) { XmlDiff diff = new XmlDiff(new XmlInput(control), new XmlInput(test), xmlUnitConfiguration); PerformAssertion(diff, assertion); }
[Test] public void CanConfigureWhitespaceHandlingNone() { DiffConfiguration xmlUnitConfiguration = new DiffConfiguration(WhitespaceHandling.None); PerformAssertion(xmlWithoutWhitespace, xmlWithWhitespaceElement, true, xmlUnitConfiguration); PerformAssertion(xmlWithoutWhitespace, xmlWithoutWhitespaceElement, true, xmlUnitConfiguration); PerformAssertion(xmlWithoutWhitespace, xmlWithWhitespace, true, xmlUnitConfiguration); PerformAssertion(xmlWithoutWhitespaceElement, xmlWithWhitespaceElement, true, xmlUnitConfiguration); }