StringAssert.Instance Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the singleton instance of the StringAssert functionality.
public static Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert Instance { get; }
static member Instance : Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert
Public Shared ReadOnly Property Instance As StringAssert
Property Value
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.Instance.ContainsWords(value, substrings);" More documentation is at "https://github.com/Microsoft/testfx/docs/README.md".