引发 TestCaseFailed 事件,以将测试用例已失败的情况通知给诊断数据适配器。
命名空间:  Microsoft.VisualStudio.TestTools.Execution
程序集:  Microsoft.VisualStudio.QualityTools.ExecutionCommon(在 Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll 中)
语法
声明
Public MustOverride Sub RaiseTestFailedEvent ( _
    testCase As ITestElement, _
    failureType As TestCaseFailureType _
)
public abstract void RaiseTestFailedEvent(
    ITestElement testCase,
    TestCaseFailureType failureType
)
public:
virtual void RaiseTestFailedEvent(
    ITestElement^ testCase, 
    TestCaseFailureType failureType
) abstract
abstract RaiseTestFailedEvent : 
        testCase:ITestElement * 
        failureType:TestCaseFailureType -> unit 
public abstract function RaiseTestFailedEvent(
    testCase : ITestElement, 
    failureType : TestCaseFailureType
)
参数
- testCase
 类型:Microsoft.VisualStudio.TestTools.Common.ITestElement
 一个表示当前测试用例的 ITestElement 对象。
- failureType
 类型:Microsoft.VisualStudio.TestTools.Execution.TestCaseFailureType
 TestCaseFailureType 值之一。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。