Condividi tramite


TestMethodAttribute Classe

Definizione

Questo attributo viene usato per contrassegnare i metodi di 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
Ereditarietà
TestMethodAttribute
Derivato
Attributi

Commenti

Costruttori

Nome Descrizione
TestMethodAttribute()

Inizializza una nuova istanza della classe TestMethodAttribute.

TestMethodAttribute(String, Int32)

Inizializza una nuova istanza della classe TestMethodAttribute.

TestMethodAttribute(String)

Inizializza una nuova istanza della classe TestMethodAttribute.

Proprietà

Nome Descrizione
DeclaringFilePath

Ottiene il percorso del file che dichiara l'attributo .

DeclaringLineNumber

Ottiene il numero di riga all'interno DeclaringFilePath di che dichiara l'attributo .

DisplayName

Ottiene o imposta il nome visualizzato per il test.

UnfoldingStrategy

Ottiene o imposta la strategia per lo svolgimento di test con parametri.

Metodi

Nome Descrizione
Execute(ITestMethod)

Esegue un metodo di test.

ExecuteAsync(ITestMethod)

Esegue un metodo di test.

Si applica a