C# Class PclUnit.Constraints.Pieces.ExactCountConstraint

ExactCoutConstraint applies another constraint to each item in a collection, succeeding only if a specified number of items succeed.
Inheritance: PrefixConstraint
Afficher le fichier Open project: jbtule/PclUnit

Méthodes publiques

Méthode Description
ExactCountConstraint ( int expectedCount, Constraint itemConstraint ) : System

Construct an ExactCountConstraint on top of an existing constraint

Matches ( object actual ) : bool

Apply the item constraint to each item in the collection, succeeding only if the expected number of items pass.

WriteDescriptionTo ( MessageWriter writer ) : void

Write a description of this constraint to a MessageWriter

Method Details

ExactCountConstraint() public méthode

Construct an ExactCountConstraint on top of an existing constraint
public ExactCountConstraint ( int expectedCount, Constraint itemConstraint ) : System
expectedCount int
itemConstraint Constraint
Résultat System

Matches() public méthode

Apply the item constraint to each item in the collection, succeeding only if the expected number of items pass.
public Matches ( object actual ) : bool
actual object
Résultat bool

WriteDescriptionTo() public méthode

Write a description of this constraint to a MessageWriter
public WriteDescriptionTo ( MessageWriter writer ) : void
writer MessageWriter
Résultat void