Język

DependsOnAttribute Konstruktory

Definicja

Przeciążenia

Nazwa Opis
DependsOnAttribute(String)

Inicjuje nowe wystąpienie DependsOnAttribute klasy deklarujące zależność od innej metody testowej tej samej klasy testowej.

DependsOnAttribute(Type)

Inicjuje nowe wystąpienie DependsOnAttribute klasy deklarujące zależność od każdego testu innej klasy testowej.

DependsOnAttribute(Type, String)

Inicjuje nowe wystąpienie DependsOnAttribute klasy deklarujące zależność od określonej metody testowej innej klasy testowej.

DependsOnAttribute(String)

Inicjuje nowe wystąpienie DependsOnAttribute klasy deklarujące zależność od innej metody testowej tej samej klasy testowej.

public DependsOnAttribute(string testMethodName);
new Microsoft.VisualStudio.TestTools.UnitTesting.DependsOnAttribute : string -> Microsoft.VisualStudio.TestTools.UnitTesting.DependsOnAttribute
Public Sub New (testMethodName As String)

Parametry

testMethodName
String

Nazwa metody testu wymagań wstępnych. Użyj nameof polecenia , aby zmienić nazwę metody na przechwyconą przez kompilator.

Wyjątki

Parametr testMethodName ma wartość null.

testMethodName jest pusty lub biały znak.

Dotyczy

DependsOnAttribute(Type)

Inicjuje nowe wystąpienie DependsOnAttribute klasy deklarujące zależność od każdego testu innej klasy testowej.

public DependsOnAttribute(Type testClass);
new Microsoft.VisualStudio.TestTools.UnitTesting.DependsOnAttribute : Type -> Microsoft.VisualStudio.TestTools.UnitTesting.DependsOnAttribute
Public Sub New (testClass As Type)

Parametry

testClass
Type

Klasa testu wymagań wstępnych.

Wyjątki

Parametr testClass ma wartość null.

Dotyczy

DependsOnAttribute(Type, String)

Inicjuje nowe wystąpienie DependsOnAttribute klasy deklarujące zależność od określonej metody testowej innej klasy testowej.

public DependsOnAttribute(Type testClass, string testMethodName);
new Microsoft.VisualStudio.TestTools.UnitTesting.DependsOnAttribute : Type * string -> Microsoft.VisualStudio.TestTools.UnitTesting.DependsOnAttribute
Public Sub New (testClass As Type, testMethodName As String)

Parametry

testClass
Type

Klasa testowa deklarując wymaganie wstępne.

testMethodName
String

Nazwa metody testu wymagań wstępnych. Użyj nameof polecenia , aby zmienić nazwę metody na przechwyconą przez kompilator.

Wyjątki

testClass lub testMethodName ma wartość null.

testMethodName jest pusty lub biały znak.

Dotyczy