CollectionAssert.That Property


Gets the singleton instance of the CollectionAssert functionality.

public static Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert That { get; }
member this.That : Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert
Public Shared ReadOnly Property That As CollectionAssert

Property Value


Users can use this to plug-in custom assertions through C# extension methods.

For instance, the signature of a custom assertion provider could be "public static void AreEqualUnordered(this CollectionAssert customAssert, ICollection expected, ICollection actual)"

Users could then use a syntax similar to the default assertions which in this case is "CollectionAssert.That.AreEqualUnordered(list1, list2);"

More documentation is at "".

Applies to