StringAssert.That Property

Definition

Caution

The 'That' property is obsolete and will be removed in a future version. Use the 'Instance' property instead.

Gets the singleton instance of the StringAssert functionality.

public static Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert That { get; }
[System.Obsolete("The 'That' property is obsolete and will be removed in a future version. Use the 'Instance' property instead.")]
public static Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert That { get; }
static member That : Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert
[<System.Obsolete("The 'That' property is obsolete and will be removed in a future version. Use the 'Instance' property instead.")>]
static member That : Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert
Public Shared ReadOnly Property That As StringAssert

Property Value

Attributes

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 ContainsWords(this StringAssert customAssert, string value, ICollection substrings)" Users could then use a syntax similar to the default assertions which in this case is "StringAssert.That.ContainsWords(value, substrings);" More documentation is at "https://github.com/Microsoft/testfx/docs/README.md".

Applies to