Table of Contents

Class AllItemsConstraint

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

AllItemsConstraint applies another constraint to each item in a collection, succeeding if they all succeed.

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

Constructors

AllItemsConstraint(IConstraint)

Construct an AllItemsConstraint on top of an existing constraint

public AllItemsConstraint(IConstraint itemConstraint)

Parameters

itemConstraint IConstraint

Properties

DisplayName

The display name of this Constraint for use by ToString(). The default value is the name of the constraint with trailing "Constraint" removed. Derived classes may set this to another name in their constructors.

public override string DisplayName { get; }

Property Value

string

Methods

ApplyTo<TActual>(TActual)

Apply the item constraint to each item in the collection, failing if any item fails.

public override ConstraintResult ApplyTo<TActual>(TActual actual)

Parameters

actual TActual

Returns

ConstraintResult

Type Parameters

TActual