NXUnit Framework Class Library

NXUnit.Framework Namespace

[This is preliminary documentation and subject to change.]

Namespace hierarchy

Classes

Class Description
CompareResult The return result of comparision in XMLAssert, and the result actually is a container of Diff objects.
It implements IEnumerable of .NET Framework so you can use foreach in a CompareResult object.
Note   This class may be instantiated, or further subclassed.
Diff A Diff object means a basic difference between two XMLs.
When you do comparision in XMLAssert, you will get the a CompareResult object as the return object, which is a container of Diff objects.
Note   This class may be instantiated, or further subclassed.
XMLAssert XMLAssert is the facade of NXUnit Framework.
You can access all the assertions and comparisions of NXUnit Framework , set up the properties which can work on the results of the assertions and comparisions, get the count of assertions and comparisions you have done, and create your own XMLAssert instance with the special strategy, just through this class.

Features of XMLAssert:
* Assert two XML inputs are equal.
* Compare two XML inputs and find all differences between them.
* Assert two XML declaration of the two XML inputs are equal.
* Assert two document types of the two XML inputs are equal.
* Assert the validity of an XML input.
* Assert the evaluation of an XPath expression on an XML input will return the expected value.
* Assert an XPath expression is exist for an XML input.
* Assert an XML input is included by another one.

Method Group:
In fact, every assertion or comparision in this class has 7 method signatures, they are about:
* string parameters
* string parameters with message
* TextReader parameters
* TextReader parameters with message
* Stream parameters
* Stream parameters with message
* XMLInput parameters with message
And the former 6 ones actually turn their parameters to XMLInput(s) and invoke the last one.

Note   This class may not be instantiated, or further subclassed.
XMLInput The standard form of input of XMLAssert.
You can use XMLInput objects as parameters of almost all assertions and comparisions declared in XMLAssert.

In fact, every assertion or comparision in XMLAssert has 7 method signatures, they are about:
* string parameters
* string parameters with message
* TextReader parameters
* TextReader parameters with message
* Stream parameters
* Stream parameters with message
* XMLInput parameters with message
And the former 6 ones actually turn their parameters to XMLInput(s) and invoke the last one.

Note   This class may not be instantiated, but may be further subclassed.

Structures

Structure Description
AssertStrategy AssertStrategy provides a group of options for your to build your own assertion.
Note   Don't new the struct directly, but use it like the following instead:
AssertStrategy str = XMLAssert.DEFAULT_STRATEGY;
str.IsOrderSensitive = ...
...
XMLAssert xa = XMLAssert.CreateInstance( str );

Enumerations

Enumeration Description
DiffType The types of Diff