Compartilhar via


Assert.Catch Método

Definição

Sobrecargas

Catch(Type, TestDelegate, String, Object[])
Catch(TestDelegate)
Catch(TestDelegate, String)
Catch(Type, TestDelegate)
Catch(TestDelegate, String, Object[])
Catch(Type, TestDelegate, String)
Catch<T>(TestDelegate, String)
Catch<T>(TestDelegate, String, Object[])
Catch<T>(TestDelegate)

Catch(Type, TestDelegate, String, Object[])

public static Exception Catch (Type expectedExceptionType, NUnit.Framework.TestDelegate code, string message, params object[] args);
static member Catch : Type * NUnit.Framework.TestDelegate * string * obj[] -> Exception

Parâmetros

expectedExceptionType
Type
message
String
args
Object[]

Retornos

Aplica-se a

Catch(TestDelegate)

public static Exception Catch (NUnit.Framework.TestDelegate code);
static member Catch : NUnit.Framework.TestDelegate -> Exception

Parâmetros

Retornos

Aplica-se a

Catch(TestDelegate, String)

public static Exception Catch (NUnit.Framework.TestDelegate code, string message);
static member Catch : NUnit.Framework.TestDelegate * string -> Exception

Parâmetros

message
String

Retornos

Aplica-se a

Catch(Type, TestDelegate)

public static Exception Catch (Type expectedExceptionType, NUnit.Framework.TestDelegate code);
static member Catch : Type * NUnit.Framework.TestDelegate -> Exception

Parâmetros

expectedExceptionType
Type

Retornos

Aplica-se a

Catch(TestDelegate, String, Object[])

public static Exception Catch (NUnit.Framework.TestDelegate code, string message, params object[] args);
static member Catch : NUnit.Framework.TestDelegate * string * obj[] -> Exception

Parâmetros

message
String
args
Object[]

Retornos

Aplica-se a

Catch(Type, TestDelegate, String)

public static Exception Catch (Type expectedExceptionType, NUnit.Framework.TestDelegate code, string message);
static member Catch : Type * NUnit.Framework.TestDelegate * string -> Exception

Parâmetros

expectedExceptionType
Type
message
String

Retornos

Aplica-se a

Catch<T>(TestDelegate, String)

public static T Catch<T> (NUnit.Framework.TestDelegate code, string message) where T : Exception;
static member Catch : NUnit.Framework.TestDelegate * string -> 'T (requires 'T :> Exception)

Parâmetros de tipo

T

Parâmetros

message
String

Retornos

T

Aplica-se a

Catch<T>(TestDelegate, String, Object[])

public static T Catch<T> (NUnit.Framework.TestDelegate code, string message, params object[] args) where T : Exception;
static member Catch : NUnit.Framework.TestDelegate * string * obj[] -> 'T (requires 'T :> Exception)

Parâmetros de tipo

T

Parâmetros

message
String
args
Object[]

Retornos

T

Aplica-se a

Catch<T>(TestDelegate)

public static T Catch<T> (NUnit.Framework.TestDelegate code) where T : Exception;
static member Catch : NUnit.Framework.TestDelegate -> 'T (requires 'T :> Exception)

Parâmetros de tipo

T

Parâmetros

Retornos

T

Aplica-se a