Search Results for

    Show / Hide Table of Contents

    Class NotConstraint

    NotConstraint negates the effect of some other constraint

    Inheritance
    object
    Constraint
    PrefixConstraint
    NotConstraint
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    PrefixConstraint.BaseConstraint
    PrefixConstraint.DescriptionPrefix
    PrefixConstraint.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.DisplayName
    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 NotConstraint : PrefixConstraint, IConstraint, IResolveConstraint

    Constructors

    View Source

    NotConstraint(IConstraint)

    Initializes a new instance of the NotConstraint class.

    Declaration
    public NotConstraint(IConstraint baseConstraint)
    Parameters
    Type Name Description
    IConstraint baseConstraint

    The base constraint to be negated.

    Methods

    View Source

    ApplyTo<TActual>(TActual)

    Test whether the constraint is satisfied by a given value

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

    The value to be tested

    Returns
    Type Description
    ConstraintResult

    True for if the base constraint fails, false if it succeeds

    Type Parameters
    Name Description
    TActual
    Overrides
    Constraint.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