Assert.Throws Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
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
Paramètres
- expression
- IResolveConstraint
- code
- TestDelegate
- message
- String
- args
- Object[]
Retours
S’applique à
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
Paramètres
- expression
- IResolveConstraint
- code
- TestDelegate
Retours
S’applique à
Throws(Type, TestDelegate)
public static Exception Throws(Type expectedExceptionType, NUnit.Framework.TestDelegate code);
static member Throws : Type * NUnit.Framework.TestDelegate -> Exception
Paramètres
- expectedExceptionType
- Type
- code
- TestDelegate
Retours
S’applique à
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
Paramètres
- expression
- IResolveConstraint
- code
- TestDelegate
- message
- String
Retours
S’applique à
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
Paramètres
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
Retours
S’applique à
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
Paramètres
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
- args
- Object[]
Retours
S’applique à
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)
Paramètres de type
- T
Paramètres
- code
- TestDelegate
- message
- String
Retours
T
S’applique à
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)
Paramètres de type
- T
Paramètres
- code
- TestDelegate
Retours
T
S’applique à
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)
Paramètres de type
- T
Paramètres
- code
- TestDelegate
- message
- String
- args
- Object[]
Retours
T