ResolvableConstraintExpression Class

Summary

ResolvableConstraintExpression is used to represent a compound constraint being constructed at a point where the last operator may either terminate the expression or may have additional qualifying constraints added to it. It is used, for example, for a Property element or for an Exception element, either of which may be optionally followed by constraints that apply to the property or exception.
Namespace
TCLite.Constraints
Interfaces
Base Types
graph BT Type-->Base0["ConstraintExpression"] click Base0 "/tc-lite/api/TCLite.Constraints/ConstraintExpression" Base0-->Base1["object"] Type-.->Interface0["IResolveConstraint"] click Interface0 "/tc-lite/api/TCLite.Constraints/IResolveConstraint" Type["ResolvableConstraintExpression"] class Type type-node

Syntax

public class ResolvableConstraintExpression : ConstraintExpression, IResolveConstraint

Constructors

Name Summary
ResolvableConstraintExpression(ConstraintBuilder) Create a new instance of ResolvableConstraintExpression, passing in a pre-populated ConstraintBuilder.

Properties

Name Value Summary
And ConstraintExpression
Appends an And Operator to the expression
Builder ConstraintBuilder
The ConstraintBuilder associated with this expression
Inherited from ConstraintExpression
False FalseConstraint
Returns a constraint that tests for False
Inherited from ConstraintExpression
Negative LessThanConstraint<int>
Returns a constraint that tests for a negative value
Inherited from ConstraintExpression
Null NullConstraint
Returns a constraint that tests for null
Inherited from ConstraintExpression
One ItemsConstraintExpression
Returns a ItemsConstraintExpression which will apply the following constraint to only one member of the collection, and fail if none or more than one match occurs.
Inherited from ConstraintExpression
Or ConstraintExpression
Appends an Or operator to the expression.
Positive GreaterThanConstraint<int>
Returns a constraint that tests for a positive value
Inherited from ConstraintExpression
True TrueConstraint
Returns a constraint that tests for True
Inherited from ConstraintExpression
Unique UniqueItemsConstraint
Returns a constraint that tests whether a collection contains all unique items.
Inherited from ConstraintExpression
Zero EqualConstraint<int>
Returns a constraint that tests if item is equal to zero
Inherited from ConstraintExpression

Methods

Name Value Summary
Append(Constraint) Constraint
Appends a constraint to the expression and returns that constraint, which is associated with the current state of the expression being built.
Inherited from ConstraintExpression
Append(ConstraintOperator) ConstraintExpression
Appends an operator to the expression and returns the resulting expression itself.
Inherited from ConstraintExpression
Append(SelfResolvingOperator) ResolvableConstraintExpression
Appends a self-resolving operator to the expression and returns a new ResolvableConstraintExpression.
Inherited from ConstraintExpression
AtLeast<T>(T) GreaterThanOrEqualConstraint<T>
Returns a constraint that tests whether the actual value is greater than or equal to the suppled argument
Inherited from ConstraintExpression
AtMost<T>(T) LessThanOrEqualConstraint<T>
Returns a constraint that tests whether the actual value is less than or equal to the suppled argument
Inherited from ConstraintExpression
Contains(string) ContainsConstraint<string>
Returns a new ContainsConstraint. This constraint will, in turn, make use of the appropriate second-level constraint, depending on the type of the actual argument. This overload is only used if the item sought is a string, since any other type implies that we are looking for a collection member.
Inherited from ConstraintExpression
ContainsSubstring(string) SubstringConstraint
Returns a constraint that succeeds if the actual value contains the substring supplied as an argument.
Inherited from ConstraintExpression
EndsWith(string) EndsWithConstraint
Returns a constraint that succeeds if the actual value ends with the substring supplied as an argument.
Inherited from ConstraintExpression
EqualTo<T>(T) EqualConstraint<T>
Returns a constraint that tests two items for equality
Inherited from ConstraintExpression
EquivalentTo(IEnumerable) CollectionEquivalentConstraint
Returns a constraint that tests whether the actual value is a collection containing the same elements as the collection supplied as an argument.
Inherited from ConstraintExpression
Exactly(int) ItemsConstraintExpression
Returns a ConstraintExpression, which will apply the following constraint to all members of a collection, succeeding only if a specified number of them succeed.
Inherited from ConstraintExpression
GreaterThan<T>(T) GreaterThanConstraint<T>
Returns a constraint that tests whether the actual value is greater than the suppled argument
Inherited from ConstraintExpression
GreaterThanOrEqualTo<T>(T) GreaterThanOrEqualConstraint<T>
Returns a constraint that tests whether the actual value is greater than or equal to the suppled argument
Inherited from ConstraintExpression
InRange<T>(T, T) RangeConstraint<T>
Returns a constraint that tests whether the actual value falls within a specified range.
Inherited from ConstraintExpression
InstanceOf(Type) InstanceOfTypeConstraint
Returns a constraint that tests whether the actual value is of the type supplied as an argument or a derived type.
Inherited from ConstraintExpression
InstanceOf<T>() InstanceOfTypeConstraint
Returns a constraint that tests whether the actual value is of the type supplied as an argument or a derived type.
Inherited from ConstraintExpression
LessThan<T>(T) LessThanConstraint<T>
Returns a constraint that tests whether the actual value is less than the suppled argument
Inherited from ConstraintExpression
LessThanOrEqualTo<T>(T) LessThanOrEqualConstraint<T>
Returns a constraint that tests whether the actual value is less than or equal to the suppled argument
Inherited from ConstraintExpression
Matches(Regex) RegexConstraint
Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument.
Inherited from ConstraintExpression
Matches(string, RegexOptions) RegexConstraint
Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument.
Inherited from ConstraintExpression
SameAs<T>(T) SameAsConstraint<T>
Returns a constraint that tests that two references are the same object
Inherited from ConstraintExpression
StartsWith(string) StartsWithConstraint
Returns a constraint that succeeds if the actual value starts with the substring supplied as an argument.
Inherited from ConstraintExpression
TypeOf(Type) ExactTypeConstraint
Returns a constraint that tests whether the actual value is of the exact type supplied as an argument.
Inherited from ConstraintExpression
TypeOf<T>() ExactTypeConstraint
Returns a constraint that tests whether the actual value is of the exact type supplied as an argument.
Inherited from ConstraintExpression