IHostAdapter.GetTestAdapter 方法
針對指定的測試項目和回合內容,載入和傳回測試配器。
命名空間: Microsoft.VisualStudio.TestTools.Execution
組件: Microsoft.VisualStudio.QualityTools.ExecutionCommon (在 Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll 中)
語法
'宣告
Function GetTestAdapter ( _
test As ITestElement, _
runContext As IRunContext _
) As ITestAdapter
ITestAdapter GetTestAdapter(
ITestElement test,
IRunContext runContext
)
ITestAdapter^ GetTestAdapter(
ITestElement^ test,
IRunContext^ runContext
)
abstract GetTestAdapter :
test:ITestElement *
runContext:IRunContext -> ITestAdapter
function GetTestAdapter(
test : ITestElement,
runContext : IRunContext
) : ITestAdapter
參數
- test
型別:Microsoft.VisualStudio.TestTools.Common.ITestElement
ITestElement ,描述要載入哪個測試配接器。
- runContext
型別:Microsoft.VisualStudio.TestTools.Execution.IRunContext
測試配接器的 IRunContext。
傳回值
型別:Microsoft.VisualStudio.TestTools.TestAdapter.ITestAdapter
目前的 ITestAdapter。
範例
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。