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
leftIConstraintThe first constraint
rightIConstraintThe second constraint
Properties
Description
Gets text describing a constraint
public override string Description { get; }
Property Value
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
actualTActualThe actual value
Returns
- ConstraintResult
True if the constraints both succeeded
Type Parameters
TActual