共用方式為


UITestInterpreterCore.IsExpectedExceptionFromActionExecution 方法

如果預期執行動作會產生指定的例外狀況,則傳回 true。

命名空間:  Microsoft.VisualStudio.TestTools.UITest.CodeGeneration
組件:  Microsoft.VisualStudio.TestTools.UITest.Common (在 Microsoft.VisualStudio.TestTools.UITest.Common.dll 中)

語法

'宣告
Protected Friend Overridable Function IsExpectedExceptionFromActionExecution ( _
    ex As Exception _
) As Boolean
protected internal virtual bool IsExpectedExceptionFromActionExecution(
    Exception ex
)
protected public:
virtual bool IsExpectedExceptionFromActionExecution(
    Exception^ ex
)
abstract IsExpectedExceptionFromActionExecution : 
        ex:Exception -> bool  
override IsExpectedExceptionFromActionExecution : 
        ex:Exception -> bool
function IsExpectedExceptionFromActionExecution(
    ex : Exception
) : boolean

參數

  • ex
    類型:Exception

傳回值

類型:Boolean

.NET Framework 安全性

請參閱

參考

UITestInterpreterCore 類別

Microsoft.VisualStudio.TestTools.UITest.CodeGeneration 命名空間