Table of Contents

Class EmptyConstraint

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

EmptyConstraint tests a whether a string or collection is empty, postponing the decision about which test is applied until the type of the actual argument is known.

public class EmptyConstraint : Constraint, IConstraint, IResolveConstraint
Inheritance
EmptyConstraint
Implements
Inherited Members

Constructors

EmptyConstraint()

public EmptyConstraint()

Properties

Description

The Description of what this constraint tests, for use in messages and in the ConstraintResult.

public override string Description { get; }

Property Value

string

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 success, false for failure

Type Parameters

TActual