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