TestMethodAttribute Class

Definition

This attribute is used to mark test methods.

C#
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)]
public class TestMethodAttribute : Attribute
C#
[System.AttributeUsage(System.AttributeTargets.Method)]
public class TestMethodAttribute : Attribute
C#
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)]
public sealed class TestMethodAttribute : Attribute
Inheritance
TestMethodAttribute
Derived
Attributes

Remarks

Constructors

TestMethodAttribute()

Initializes a new instance of the TestMethodAttribute class.

TestMethodAttribute(String)

Initializes a new instance of the TestMethodAttribute class.

Properties

DisplayName

Gets display name for the test.

Methods

Execute(ITestMethod)

Executes a test method.

Applies to

Produkt Versiounen
MSTest.TestFramework 1.1.18, 1.2.1, 1.3.2, 1.4.0, 2.2.0, 2.1.2, 2.2.10, 3.0.4, 3.1.1, 3.2.2, 3.3.1, 3.4.3, 3.5.1, 3.6.4, 3.7.3, 3.8.0