ReactiveAssert.Throws<TException> 方法 (Action、String)

断言给定操作引发泛型参数中指定的类型的异常。

Namespace:Microsoft.Reactive.Testing
装配: Microsoft.Reactive.Testing.dll) 中的 Microsoft.Reactive.Testing (

语法

'Declaration
Public Shared Sub Throws(Of TException As Exception) ( _
    action As Action, _
    message As String _
)
'Usage
Dim action As Action
Dim message As String

ReactiveAssert.Throws(action, message)
public static void Throws<TException>(
    Action action,
    string message
)
where TException : Exception
public:
generic<typename TException>
where TException : Exception
static void Throws(
    Action^ action, 
    String^ message
)
static member Throws : 
        action:Action * 
        message:string -> unit  when 'TException : Exception
JScript does not support generic types and methods.

类型参数

  • TException
    要为其检查的异常的类型。

parameters

另请参阅

参考

ReactiveAssert 类

引发重载

Microsoft.Reactive.Testing 命名空间