Sdílet prostřednictvím


TestMethodAttribute Třída

Definice

Tento atribut slouží k označení testovacích metod.

[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
Dědičnost
TestMethodAttribute
Odvozené
Atributy

Poznámky

Konstruktory

Name Description
TestMethodAttribute()

Inicializuje novou instanci TestMethodAttribute třídy.

TestMethodAttribute(String, Int32)

Inicializuje novou instanci TestMethodAttribute třídy.

TestMethodAttribute(String)

Inicializuje novou instanci TestMethodAttribute třídy.

Vlastnosti

Name Description
DeclaringFilePath

Získá cestu k souboru, který deklaruje atribut.

DeclaringLineNumber

Získá číslo řádku v rámci DeclaringFilePath deklaruje atribut.

DisplayName

Získá nebo nastaví zobrazovaný název testu.

UnfoldingStrategy

Získá nebo nastaví strategii pro rozbalení parametrizovaných testů.

Metody

Name Description
Execute(ITestMethod)

Spustí testovací metodu.

ExecuteAsync(ITestMethod)

Spustí testovací metodu.

Platí pro