Bagikan melalui


TestMethodAttribute Kelas

Definisi

Atribut ini digunakan untuk menandai metode pengujian.

[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
Warisan
TestMethodAttribute
Turunan
Atribut

Keterangan

Konstruktor

Nama Deskripsi
TestMethodAttribute()

Menginisialisasi instans baru dari kelas TestMethodAttribute.

TestMethodAttribute(String, Int32)

Menginisialisasi instans baru dari kelas TestMethodAttribute.

TestMethodAttribute(String)

Menginisialisasi instans baru dari kelas TestMethodAttribute.

Properti

Nama Deskripsi
DeclaringFilePath

Mendapatkan jalur file yang mendeklarasikan atribut .

DeclaringLineNumber

Mendapatkan nomor baris dalam DeclaringFilePath yang mendeklarasikan atribut .

DisplayName

Mendapatkan atau mengatur nama tampilan untuk pengujian.

UnfoldingStrategy

Mendapatkan atau mengatur strategi untuk membuka pengujian berparameter.

Metode

Nama Deskripsi
Execute(ITestMethod)

Menjalankan metode pengujian.

ExecuteAsync(ITestMethod)

Menjalankan metode pengujian.

Berlaku untuk