Udostępnij za pośrednictwem


TestMethodAttribute Klasa

Definicja

Ten atrybut służy do oznaczania metod testowych.

[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
Dziedziczenie
TestMethodAttribute
Pochodne
Atrybuty

Uwagi

Konstruktory

Nazwa Opis
TestMethodAttribute()

Inicjuje nowe wystąpienie klasy TestMethodAttribute.

TestMethodAttribute(String, Int32)

Inicjuje nowe wystąpienie klasy TestMethodAttribute.

TestMethodAttribute(String)

Inicjuje nowe wystąpienie klasy TestMethodAttribute.

Właściwości

Nazwa Opis
DeclaringFilePath

Pobiera ścieżkę pliku, która deklaruje atrybut.

DeclaringLineNumber

Pobiera numer wiersza, który DeclaringFilePath deklaruje atrybut .

DisplayName

Pobiera lub ustawia nazwę wyświetlaną testu.

UnfoldingStrategy

Pobiera lub ustawia strategię rozwoju sparametryzowanych testów.

Metody

Nazwa Opis
Execute(ITestMethod)

Wykonuje metodę testową.

ExecuteAsync(ITestMethod)

Wykonuje metodę testową.

Dotyczy