語言

PlannedTest 建構函式

定義

初始化 PlannedTest 類別的新執行個體。

public PlannedTest(string fullyQualifiedTestClassName, string testName, string? testDisplayName, string assemblyPath, string? managedTypeName, string? managedMethodName, string? declaringFilePath, int? declaringLineNumber, System.Collections.Generic.IReadOnlyCollection<string> testCategories, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string,string>> testProperties);
new Microsoft.VisualStudio.TestTools.UnitTesting.PlannedTest : string * string * string * string * string * string * string * Nullable<int> * System.Collections.Generic.IReadOnlyCollection<string> * System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string, string>> -> Microsoft.VisualStudio.TestTools.UnitTesting.PlannedTest
Public Sub New (fullyQualifiedTestClassName As String, testName As String, testDisplayName As String, assemblyPath As String, managedTypeName As String, managedMethodName As String, declaringFilePath As String, declaringLineNumber As Nullable(Of Integer), testCategories As IReadOnlyCollection(Of String), testProperties As IReadOnlyCollection(Of KeyValuePair(Of String, String)))

參數

fullyQualifiedTestClassName
String

完整且符合資格的類別名稱,宣告測試方法。

testName
String

測試方法的簡單名稱。

testDisplayName
String

測試的顯示名稱(設定時);否則 null。

assemblyPath
String

宣告測試的組件的完整路徑,放在磁碟上。

managedTypeName
String

ECMA-335 負責管理宣告型號的型號名稱(若有)。

managedMethodName
String

ECMA-335 管理方法名稱(編碼參數類型)用於測試方法(如有)。

declaringFilePath
String

宣告測試的原始碼檔案,編譯時由 TestMethodAttribute擷取(若有)。

declaringLineNumber
Nullable<Int32>

測試宣告時的行號 declaringFilePath (如有)。

testCategories
IReadOnlyCollection<String>

這些類別是透過 TestCategoryAttribute所應用的。

testProperties
IReadOnlyCollection<KeyValuePair<String,String>>

名稱/值對透過 TestPropertyAttribute。 多個同名條目被保存下來。

適用於