次の方法で共有


StringAssert.That プロパティ

定義

StringAssert 機能のシングルトン インスタンスを取得します。

public static Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert That { get; }
[System.Runtime.CompilerServices.Nullable(1)]
public static Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert That { get; }
static member That : Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert
[<System.Runtime.CompilerServices.Nullable(1)>]
static member That : Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert
Public Shared ReadOnly Property That As StringAssert

プロパティ値

属性

注釈

ユーザーはこれを使用して、C# 拡張メソッドを使用してカスタム アサーションをプラグインできます。 たとえば、カスタム アサーション プロバイダーのシグネチャは"public static void ContainsWords(this StringAssert customAssert, string value, ICollection substrings)" である可能性があります。その後、ユーザーは既定のアサーションと同様の構文を使用できます。この場合は "StringAssert.That.ContainsWords(value, substrings);" です。その他のドキュメントについては、「https://github.com/Microsoft/testfx/docs/README.md」を参照してください。

適用対象