Has Has Class

Definition

Helper class with properties and methods that supply a number of constraints used in Asserts.

public class Has
type Has = class
Inheritance
HasHas

Constructors

Has() Has()

Properties

All All

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

Count Count

Returns a new ConstraintExpression, which will apply the following constraint to the Count property of the object being tested.

InnerException InnerException

Returns a new ConstraintExpression, which will apply the following constraint to the InnerException property of the object being tested.

Length Length

Returns a new ConstraintExpression, which will apply the following constraint to the Length property of the object being tested.

Message Message

Returns a new ConstraintExpression, which will apply the following constraint to the Message property of the object being tested.

No No

Returns a ConstraintExpression that negates any following constraint.

None None

Returns a ConstraintExpression, which will apply the following constraint to all members of a collection, succeeding if all of them fail.

Some Some

Returns a ConstraintExpression, which will apply the following constraint to all members of a collection, succeeding if at least one of them succeeds.

Methods

Attribute(Type) Attribute(Type)

Returns a new AttributeConstraint checking for the presence of a particular attribute on an object.

Attribute<T>() Attribute<T>()

Returns a new AttributeConstraint checking for the presence of a particular attribute on an object.

Exactly(Int32) Exactly(Int32)
Member(Object) Member(Object)

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

Property(String) Property(String)

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.

Applies to