Search Results for

    Show / Hide Table of Contents

    Class ExceptionTypeConstraint

    ExceptionTypeConstraint is a special version of ExactTypeConstraint used to provided detailed info about the exception thrown in an error message.

    Inheritance
    object
    Constraint
    TypeConstraint
    ExactTypeConstraint
    ExceptionTypeConstraint
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    ExactTypeConstraint.Matches(object)
    ExactTypeConstraint.DisplayName
    TypeConstraint.expectedType
    TypeConstraint.actualType
    TypeConstraint.Description
    Constraint.ApplyTo<TActual>(ActualValueDelegate<TActual>)
    Constraint.ApplyTo<TActual>(ref TActual)
    Constraint.ApplyToAsync<TActual>(Func<Task<TActual>>)
    Constraint.GetTestObject<TActual>(ActualValueDelegate<TActual>)
    Constraint.ToString()
    Constraint.GetStringRepresentation(IEnumerable)
    Constraint.GetStringRepresentation()
    Constraint.After(int)
    Constraint.After(int, int)
    Constraint.Arguments
    Constraint.Builder
    Constraint.And
    Constraint.With
    Constraint.Or
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public class ExceptionTypeConstraint : ExactTypeConstraint, IConstraint, IResolveConstraint

    Constructors

    View Source

    ExceptionTypeConstraint(Type)

    Constructs an ExceptionTypeConstraint

    Declaration
    public ExceptionTypeConstraint(Type type)
    Parameters
    Type Name Description
    Type type

    Methods

    View Source

    ApplyTo<TActual>(TActual)

    Applies the constraint to an actual value, returning a ConstraintResult.

    Declaration
    public override ConstraintResult ApplyTo<TActual>(TActual actual)
    Parameters
    Type Name Description
    TActual actual

    The value to be tested

    Returns
    Type Description
    ConstraintResult

    A ConstraintResult

    Type Parameters
    Name Description
    TActual
    Overrides
    TypeConstraint.ApplyTo<TActual>(TActual)

    Implements

    IConstraint
    IResolveConstraint
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0