次の方法で共有


STATestMethodAttribute クラス

定義

テスト クラス属性。

[System.AttributeUsage(System.AttributeTargets.Method)]
public class STATestMethodAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute
[System.AttributeUsage(System.AttributeTargets.Method)]
[System.Runtime.CompilerServices.Nullable(0)]
public class STATestMethodAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type STATestMethodAttribute = class
    inherit TestMethodAttribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type STATestMethodAttribute = class
    inherit TestMethodAttribute
Public Class STATestMethodAttribute
Inherits TestMethodAttribute
継承
STATestMethodAttribute
属性

コンストラクター

名前 説明
STATestMethodAttribute()

STATestMethodAttribute クラスの新しいインスタンスを初期化します。

STATestMethodAttribute(String, Int32)

STATestMethodAttribute クラスの新しいインスタンスを初期化します。

STATestMethodAttribute(String)

STATestMethodAttribute クラスの新しいインスタンスを初期化します。

STATestMethodAttribute(TestMethodAttribute)

STATestMethodAttribute クラスの新しいインスタンスを初期化します。 このコンストラクターは、既存のテスト メソッド属性をラップするために、 STATestClassAttribute (または派生) によって呼び出されることを目的としています。 派生STATestClassAttributeによって呼び出される派生STATestMethodAttributeによって呼び出すこともできます。

プロパティ

名前 説明
DeclaringFilePath

属性を宣言するファイル パスを取得します。

(継承元 TestMethodAttribute)
DeclaringLineNumber

属性を宣言する DeclaringFilePath 内の行番号を取得します。

(継承元 TestMethodAttribute)
DisplayName

テストの表示名を取得または設定します。

(継承元 TestMethodAttribute)
UnfoldingStrategy

パラメーター化されたテストを展開するための戦略を取得または設定します。

(継承元 TestMethodAttribute)
UseSTASynchronizationContext

属性が非同期継続のために同じ STA スレッドを保持する SynchronizationContext を設定するかどうかを示す値を取得または設定します。 既定値は、false です。

メソッド

名前 説明
Execute(ITestMethod)

テスト メソッドを実行します。

(継承元 TestMethodAttribute)
ExecuteAsync(ITestMethod)

テスト メソッドを実行します。

ExecuteCoreAsync(ITestMethod)

STA テスト メソッドのコア実行。STA スレッドで発生します。

適用対象