Assert.Throws Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
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
Parameter
- expression
- IResolveConstraint
- code
- TestDelegate
- message
- String
- args
- Object[]
Gibt zurück
Gilt für:
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
Parameter
- expression
- IResolveConstraint
- code
- TestDelegate
Gibt zurück
Gilt für:
Throws(Type, TestDelegate)
public static Exception Throws (Type expectedExceptionType, NUnit.Framework.TestDelegate code);
static member Throws : Type * NUnit.Framework.TestDelegate -> Exception
Parameter
- expectedExceptionType
- Type
- code
- TestDelegate
Gibt zurück
Gilt für:
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
Parameter
- expression
- IResolveConstraint
- code
- TestDelegate
- message
- String
Gibt zurück
Gilt für:
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
Parameter
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
Gibt zurück
Gilt für:
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
Parameter
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
- args
- Object[]
Gibt zurück
Gilt für:
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)
Typparameter
- T
Parameter
- code
- TestDelegate
- message
- String
Gibt zurück
T
Gilt für:
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)
Typparameter
- T
Parameter
- code
- TestDelegate
Gibt zurück
T
Gilt für:
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)
Typparameter
- T
Parameter
- code
- TestDelegate
- message
- String
- args
- Object[]
Gibt zurück
T