NXUnit Framework Class Library

AssertStrategy.IsDeclarationSensitive Field

[This is preliminary documentation and subject to change.]

Will assertions and comparisions care about the xml declaration?

Sample:

string s1 = "<?xml version='1.0' ?><a/>";
string s2 = "<a/>";
XMLAssert xa = XMLAssert.CreateInstance();

xa.IsDeclarationSensitive = false;
xa.AreEqual(s1, s2);

xa.IsDeclarationSensitive = true;
xa.AreEqual(s1, s2);  // Failed!

public bool IsDeclarationSensitive;

See Also

AssertStrategy Class | NXUnit.Framework Namespace