Partager via


TestMethodAttribute Classe

Définition

Cet attribut est utilisé pour marquer les méthodes de test.

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)]
public class TestMethodAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method)]
public class TestMethodAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=false)]
[System.Runtime.CompilerServices.Nullable(0)]
public class TestMethodAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=false)]
public class TestMethodAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)]
public sealed class TestMethodAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)>]
type TestMethodAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type TestMethodAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=false)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type TestMethodAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=false)>]
type TestMethodAttribute = class
    inherit Attribute
Public Class TestMethodAttribute
Inherits Attribute
Public NotInheritable Class TestMethodAttribute
Inherits Attribute
Héritage
TestMethodAttribute
Dérivé
Attributs

Remarques

Constructeurs

Nom Description
TestMethodAttribute()

Initialise une nouvelle instance de la classe TestMethodAttribute.

TestMethodAttribute(String, Int32)

Initialise une nouvelle instance de la classe TestMethodAttribute.

TestMethodAttribute(String)

Initialise une nouvelle instance de la classe TestMethodAttribute.

Propriétés

Nom Description
DeclaringFilePath

Obtient le chemin d’accès du fichier qui déclare l’attribut.

DeclaringLineNumber

Obtient le numéro de ligne dans DeclaringFilePath lequel l’attribut est déclaré.

DisplayName

Obtient ou définit le nom complet du test.

UnfoldingStrategy

Obtient ou définit la stratégie de déploiement de tests paramétrables.

Méthodes

Nom Description
Execute(ITestMethod)

Exécute une méthode de test.

ExecuteAsync(ITestMethod)

Exécute une méthode de test.

S’applique à