Table of Contents

Class NotConstraint

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

NotConstraint negates the effect of some other constraint

public class NotConstraint : PrefixConstraint, IConstraint, IResolveConstraint
Inheritance
NotConstraint
Implements
Inherited Members

Constructors

NotConstraint(IConstraint)

Initializes a new instance of the NotConstraint class.

public NotConstraint(IConstraint baseConstraint)

Parameters

baseConstraint IConstraint

The base constraint to be negated.

Methods

ApplyTo<TActual>(TActual)

Test whether the constraint is satisfied by a given value

public override ConstraintResult ApplyTo<TActual>(TActual actual)

Parameters

actual TActual

The value to be tested

Returns

ConstraintResult

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

Type Parameters

TActual