Udostępnij za pośrednictwem


ReactiveAssert.Throws<TException> , metoda (Action, String)

Potwierdza, że dana akcja zgłasza wyjątek typu określonego w parametrze ogólnym.

Przestrzeń nazw:Microsoft.Reactive.Testing
Zestawu: Microsoft.Reactive.Testing (w Microsoft.Reactive.Testing.dll)

Składnia

'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.

Parametry typu

  • TException
    Typ wyjątku do sprawdzenia.

Parametry

  • message
    Typ: System.String
    Komunikat o błędzie dotyczący niepowodzenia asertywnego.

Zobacz też

Odwołanie

Reaktywna klasa

Przeciążenie rzutów

Microsoft.Reactive.Testing, przestrzeń nazw