Class AndConstraint
AndConstraint succeeds only if both members succeed.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class AndConstraint : BinaryConstraint, IConstraint, IResolveConstraint
  Constructors
View SourceAndConstraint(IConstraint, IConstraint)
Create an AndConstraint from two other constraints
Declaration
public AndConstraint(IConstraint left, IConstraint right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IConstraint | left | The first constraint  | 
      
| IConstraint | right | The second constraint  | 
      
Properties
View SourceDescription
Gets text describing a constraint
Declaration
public override string Description { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
Methods
View SourceApplyTo<TActual>(TActual)
Apply both member constraints to an actual value, succeeding only if both of them succeed.
Declaration
public override ConstraintResult ApplyTo<TActual>(TActual actual)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TActual | actual | The actual value  | 
      
Returns
| Type | Description | 
|---|---|
| ConstraintResult | True if the constraints both succeeded  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TActual |