NXUnit Framework Class Library

AssertStrategy.IsOrderSensitive Field

[This is preliminary documentation and subject to change.]

Will assertions and comparisions care about the order of the elements and attributes?

Sample:

string s1 = "<a b='c' c='b'/>";
string s2 = "<a c='b' b='c'/>";
string s3 = "<r><a/><b/></r>";
string s4 = "<r><b/><a/></r>";
XMLAssert xa = XMLAssert.CreateInstance();

xa.IsOrderSensitive = false;
xa.AreEqual(s1, s2);
xa.AreEqual(s3, s4);

xa.IsOrderSensitive = true;
xa.AreEqual(s1, s2);  // Failed!
xa.AreEqual(s3, s4);  // Failed!

public bool IsOrderSensitive;

See Also

AssertStrategy Class | NXUnit.Framework Namespace