Assert.Throws Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
Throws(IResolveConstraint, TestDelegate, String, Object[])
public static Exception Throws(NUnit.Framework.Constraints.IResolveConstraint expression, NUnit.Framework.TestDelegate code, string message, params object[] args);
static member Throws : NUnit.Framework.Constraints.IResolveConstraint * NUnit.Framework.TestDelegate * string * obj[] -> Exception
Parâmetros
- expression
- IResolveConstraint
- code
- TestDelegate
- message
- String
- args
- Object[]
Retornos
Aplica-se a
Throws(IResolveConstraint, TestDelegate)
public static Exception Throws(NUnit.Framework.Constraints.IResolveConstraint expression, NUnit.Framework.TestDelegate code);
static member Throws : NUnit.Framework.Constraints.IResolveConstraint * NUnit.Framework.TestDelegate -> Exception
Parâmetros
- expression
- IResolveConstraint
- code
- TestDelegate
Retornos
Aplica-se a
Throws(Type, TestDelegate)
public static Exception Throws(Type expectedExceptionType, NUnit.Framework.TestDelegate code);
static member Throws : Type * NUnit.Framework.TestDelegate -> Exception
Parâmetros
- expectedExceptionType
- Type
- code
- TestDelegate
Retornos
Aplica-se a
Throws(IResolveConstraint, TestDelegate, String)
public static Exception Throws(NUnit.Framework.Constraints.IResolveConstraint expression, NUnit.Framework.TestDelegate code, string message);
static member Throws : NUnit.Framework.Constraints.IResolveConstraint * NUnit.Framework.TestDelegate * string -> Exception
Parâmetros
- expression
- IResolveConstraint
- code
- TestDelegate
- message
- String
Retornos
Aplica-se a
Throws(Type, TestDelegate, String)
public static Exception Throws(Type expectedExceptionType, NUnit.Framework.TestDelegate code, string message);
static member Throws : Type * NUnit.Framework.TestDelegate * string -> Exception
Parâmetros
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
Retornos
Aplica-se a
Throws(Type, TestDelegate, String, Object[])
public static Exception Throws(Type expectedExceptionType, NUnit.Framework.TestDelegate code, string message, params object[] args);
static member Throws : Type * NUnit.Framework.TestDelegate * string * obj[] -> Exception
Parâmetros
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
- args
- Object[]
Retornos
Aplica-se a
Throws<T>(TestDelegate, String)
public static T Throws<T>(NUnit.Framework.TestDelegate code, string message) where T : Exception;
static member Throws : NUnit.Framework.TestDelegate * string -> 'T (requires 'T :> Exception)
Parâmetros de tipo
- T
Parâmetros
- code
- TestDelegate
- message
- String
Retornos
T
Aplica-se a
Throws<T>(TestDelegate)
public static T Throws<T>(NUnit.Framework.TestDelegate code) where T : Exception;
static member Throws : NUnit.Framework.TestDelegate -> 'T (requires 'T :> Exception)
Parâmetros de tipo
- T
Parâmetros
- code
- TestDelegate
Retornos
T
Aplica-se a
Throws<T>(TestDelegate, String, Object[])
public static T Throws<T>(NUnit.Framework.TestDelegate code, string message, params object[] args) where T : Exception;
static member Throws : NUnit.Framework.TestDelegate * string * obj[] -> 'T (requires 'T :> Exception)
Parâmetros de tipo
- T
Parâmetros
- code
- TestDelegate
- message
- String
- args
- Object[]
Retornos
T