Partilhar via


Assert.That Property

Definition

Gets the singleton instance of the Assert functionality.

public:
 static property Microsoft::VisualStudio::TestTools::UnitTesting::Assert ^ That { Microsoft::VisualStudio::TestTools::UnitTesting::Assert ^ get(); };
public static Microsoft.VisualStudio.TestTools.UnitTesting.Assert That { get; }
member this.That : Microsoft.VisualStudio.TestTools.UnitTesting.Assert
Public Shared ReadOnly Property That As Assert

Remarks

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 IsOfType<T>(this Assert assert, object obj)" Users could then use a syntax similar to the default assertions which in this case is "Assert.That.IsOfType<Dog>(animal);" More documentation is at "https://github.com/Microsoft/testfx-docs".

Applies to