C# Class PclUnit.Constraints.Has

Helper class with properties and methods that supply a number of constraints used in Asserts.
显示文件 Open project: jbtule/PclUnit

Public Methods

Method Description
Exactly ( int expectedCount ) : ConstraintExpression

Returns a ConstraintExpression, which will apply the following constraint to all members of a collection, succeeding only if a specified number of them succeed.

Member ( object expected ) : CollectionContainsConstraint

Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection.

Property ( string name ) : ResolvableConstraintExpression

Returns a new PropertyConstraintExpression, which will either test for the existence of the named property on the object being tested or apply any following constraint to that property.

Method Details

Exactly() public static method

Returns a ConstraintExpression, which will apply the following constraint to all members of a collection, succeeding only if a specified number of them succeed.
public static Exactly ( int expectedCount ) : ConstraintExpression
expectedCount int
return ConstraintExpression

Member() public static method

Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection.
public static Member ( object expected ) : CollectionContainsConstraint
expected object
return CollectionContainsConstraint

Property() public static method

Returns a new PropertyConstraintExpression, which will either test for the existence of the named property on the object being tested or apply any following constraint to that property.
public static Property ( string name ) : ResolvableConstraintExpression
name string
return PclUnit.Constraints.Pieces.ResolvableConstraintExpression