共用方式為


TestExecution.BeforeTestInitialize 事件

發生在測試開始初始化之前。

命名空間:  Microsoft.VisualStudio.TestTools.UnitTesting
組件:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (在 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 中)

語法

'宣告
Public MustOverride Event BeforeTestInitialize As EventHandler(Of BeforeTestInitializeEventArgs)
public abstract event EventHandler<BeforeTestInitializeEventArgs> BeforeTestInitialize
public:
virtual  event EventHandler<BeforeTestInitializeEventArgs^>^ BeforeTestInitialize {
    void add (EventHandler<BeforeTestInitializeEventArgs^>^ value);
    void remove (EventHandler<BeforeTestInitializeEventArgs^>^ value);
}
abstract BeforeTestInitialize : IEvent<EventHandler<BeforeTestInitializeEventArgs>,
    BeforeTestInitializeEventArgs>
JScript 不支援事件。

.NET Framework 安全性

請參閱

參考

TestExecution 類別

Microsoft.VisualStudio.TestTools.UnitTesting 命名空間