Share via


STATestMethodAttribute Class

Definition

The test class attribute.

[System.AttributeUsage(System.AttributeTargets.Method)]
public class STATestMethodAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type STATestMethodAttribute = class
    inherit TestMethodAttribute
Public Class STATestMethodAttribute
Inherits TestMethodAttribute
Inheritance
STATestMethodAttribute
Attributes

Constructors

STATestMethodAttribute()

Initializes a new instance of the STATestMethodAttribute class.

STATestMethodAttribute(String, Int32)

Initializes a new instance of the STATestMethodAttribute class.

STATestMethodAttribute(String)

Initializes a new instance of the STATestMethodAttribute class.

STATestMethodAttribute(TestMethodAttribute)

Initializes a new instance of the STATestMethodAttribute class. This constructor is intended to be called by STATestClassAttribute (or derived) to wrap an existing test method attribute. It can also be called by a derived STATestMethodAttribute which will be called by a derived STATestClassAttribute.

Properties

DeclaringFilePath

Gets the file path that declares the attribute.

(Inherited from TestMethodAttribute)
DeclaringLineNumber

Gets the line number within DeclaringFilePath that declares the attribute.

(Inherited from TestMethodAttribute)
DisplayName

Gets display name for the test.

(Inherited from TestMethodAttribute)
UnfoldingStrategy

Gets the strategy for unfolding parameterized tests.

(Inherited from TestMethodAttribute)

Methods

Execute(ITestMethod)

Executes a test method.

(Inherited from TestMethodAttribute)
ExecuteAsync(ITestMethod)

Executes a test method.

ExecuteCoreAsync(ITestMethod)

The core execution of STA test method, which happens on the STA thread.

Applies to