Compartilhar via


TestMethodAttribute Classe

Definição

Esse atributo é usado para marcar métodos de teste.

[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
Herança
TestMethodAttribute
Derivado
Atributos

Comentários

Construtores

Nome Description
TestMethodAttribute()

Inicializa uma nova instância da classe TestMethodAttribute.

TestMethodAttribute(String, Int32)

Inicializa uma nova instância da classe TestMethodAttribute.

TestMethodAttribute(String)

Inicializa uma nova instância da classe TestMethodAttribute.

Propriedades

Nome Description
DeclaringFilePath

Obtém o caminho do arquivo que declara o atributo.

DeclaringLineNumber

Obtém o número de linha dentro DeclaringFilePath que declara o atributo.

DisplayName

Obtém ou define o nome de exibição do teste.

UnfoldingStrategy

Obtém ou define a estratégia para desdobrar testes parametrizados.

Métodos

Nome Description
Execute(ITestMethod)

Executa um método de teste.

ExecuteAsync(ITestMethod)

Executa um método de teste.

Aplica-se a