NUnit.Framework.Throws public abstract class Throws Helper class with properties and methods that supply constraints that operate on exceptions. Documentation Code namespace NUnit.Framework { public abstract class Throws { public static ResolvableConstraintExpression Exception { get; } public static ResolvableConstraintExpression InnerException { get; } public static ExactTypeConstraint<TargetInvocationException> TargetInvocationException { get; } public static ExactTypeConstraint<ArgumentException> ArgumentException { get; } public static ExactTypeConstraint<ArgumentNullException> ArgumentNullException { get; } public static ExactTypeConstraint<InvalidOperationException> InvalidOperationException { get; } public static ThrowsNothingConstraint Nothing { get; } public static ExactTypeConstraint TypeOf(Type expectedType); public static ExactTypeConstraint<TExpected> TypeOf<[Nullable(0)] TExpected>() where TExpected : Exception; public static InstanceOfTypeConstraint InstanceOf(Type expectedType); public static InstanceOfTypeConstraint<TExpected> InstanceOf<[Nullable(0)] TExpected>() where TExpected : Exception; protected Throws(); } }