Table of Contents

Class AndConstraint

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

AndConstraint succeeds only if both members succeed.

public class AndConstraint : BinaryConstraint, IConstraint, IResolveConstraint
Inheritance
AndConstraint
Implements
Inherited Members

Constructors

AndConstraint(IConstraint, IConstraint)

Create an AndConstraint from two other constraints

public AndConstraint(IConstraint left, IConstraint right)

Parameters

left IConstraint

The first constraint

right IConstraint

The second constraint

Properties

Description

Gets text describing a constraint

public override string Description { get; }

Property Value

string

Methods

ApplyTo<TActual>(TActual)

Apply both member constraints to an actual value, succeeding succeeding only if both of them succeed.

public override ConstraintResult ApplyTo<TActual>(TActual actual)

Parameters

actual TActual

The actual value

Returns

ConstraintResult

True if the constraints both succeeded

Type Parameters

TActual