C# Class PclUnit.Constraints.Pieces.AndConstraint

AndConstraint succeeds only if both members succeed.
Inheritance: BinaryConstraint
Show file Open project: jbtule/PclUnit

Public Methods

Method Description
AndConstraint ( Constraint left, Constraint right )

Create an AndConstraint from two other constraints

Matches ( object actual ) : bool

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

WriteActualValueTo ( MessageWriter writer ) : void

Write the actual value for a failing constraint test to a MessageWriter. The default implementation simply writes the raw value of actual, leaving it to the writer to perform any formatting.

WriteDescriptionTo ( MessageWriter writer ) : void

Write a description for this contraint to a MessageWriter

Method Details

AndConstraint() public method

Create an AndConstraint from two other constraints
public AndConstraint ( Constraint left, Constraint right )
left Constraint The first constraint
right Constraint The second constraint

Matches() public method

Apply both member constraints to an actual value, succeeding succeeding only if both of them succeed.
public Matches ( object actual ) : bool
actual object The actual value
return bool

WriteActualValueTo() public method

Write the actual value for a failing constraint test to a MessageWriter. The default implementation simply writes the raw value of actual, leaving it to the writer to perform any formatting.
public WriteActualValueTo ( MessageWriter writer ) : void
writer MessageWriter The writer on which the actual value is displayed
return void

WriteDescriptionTo() public method

Write a description for this contraint to a MessageWriter
public WriteDescriptionTo ( MessageWriter writer ) : void
writer MessageWriter The MessageWriter to receive the description
return void