다음을 통해 공유


ReactiveAssert.Throw<TException> 메서드(Action, String)

지정된 작업이 제네릭 매개 변수에 지정된 형식의 예외를 throw한다고 어설션합니다.

네임스페이스:Microsoft.Reactive.Testing
어셈블리: Microsoft.Reactive.Testing(Microsoft.Reactive.Testing.dll)

Syntax

'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
    검사 예외의 형식입니다.

매개 변수

  • message
    형식: System.String
    어설션 실패에 대한 오류 메시지입니다.

참고 항목

참조

ReactiveAssert 클래스

오버로드를 throw합니다.

Microsoft.Reactive.Testing 네임스페이스