TCLite.Constraints Namespace

Class Types

Class Summary
AllItemsConstraint AllItemsConstraint applies another constraint to each item in a collection, succeeding if they all succeed.
AndConstraint AndConstraint succeeds only if both members succeed.
BinaryConstraint BinaryConstraint is the abstract base of all constraints that combine two other constraints in some fashion.
CollectionConstraint CollectionConstraint is the abstract base class for constraints that operate on collections.
CollectionEquivalentConstraint CollectionEquivalentConstraint is used to determine whether two collections are equivalent.
CollectionItemsEqualConstraint CollectionItemsEqualConstraint is the abstract base class for all collection constraints that apply some notion of item equality as a part of their operation.
CollectionTally CollectionTally counts (tallies) the number of occurrences of each object in one or more enumerations.
ComparisonAdapter ComparisonAdapter class centralizes all comparisons of values in NUnit, adapting to the use of any provided IComparer, IComparer<T> or Comparison<T>
ComparisonConstraint<TExpected> Abstract base class for constraints that compare values to determine if one is greater than, equal to or less than the other. This class supplies the Using modifiers.
ConditionConstraint<TActual> The ConditionConstraint class represents a constraint, which asserts a particular condition on an actual value of the Type specified in the TypeParameter.
Constraint The Constraint class is the base of all built-in constraints within TCLite. The class models a constraint, which puts no limitations on the type of actual value it is able to handle.
ConstraintBuilder ConstraintBuilder maintains the stacks that are used in processing a ConstraintExpression. An OperatorStack is used to hold operators that are waiting for their operands to be recognized. a ConstraintStack holds input constraints as well as the results of each operator applied.
ConstraintExpression ConstraintExpression represents a compound constraint in the process of being constructed from a series of syntactic elements. Individual elements are appended to the expression as they are recognized. Once an actual Constraint is appended, the expression returns a resolvable Constraint.
ContainsConstraint<TExpected> ContainsConstraint tests a whether a string contains a substring or a collection contains an object. It postpones the decision of which test to use until the type of the actual argument is known. This allows testing whether a string is contained in a collection or as a substring of another string using the same syntax.
EmptyCollectionConstraint EmptyCollectionConstraint tests whether a collection is empty.
EmptyConstraint EmptyConstraint tests a whether a string or collection is empty, postponing the decision about which test is applied until the type of the actual argument is known.
EmptyStringConstraint EmptyStringConstraint tests whether a string is empty.
EndsWithConstraint EndsWithConstraint can test whether a string ends with an expected substring.
EqualConstraint<TExpected> EqualConstraint is able to compare an actual value with the expected value provided in its constructor. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types.
ExactCountConstraint ExactCountConstraint applies another constraint to each item in a collection, succeeding only if a specified number of items succeed.
ExactTypeConstraint ExactTypeConstraint is used to test that an object is of the exact type provided in the constructor
ExceptionTypeConstraint ExceptionTypeConstraint is a special version of ExactTypeConstraint used to provided detailed info about the exception thrown in an error message.
ExpectedValueConstraint<TExpected> ExpectedValueConstraint is a constraint taking an expected value as a constructor argument, which any actual value is supposed to match in some way. In some cases, the Type of the expected value is used in determining the Types allowed as actual values.
FailurePoint FailurePoint class represents one point of failure in an equality test.
FalseConstraint FalseConstraint tests that the actual value is false
FloatingPointNumerics Helper routines for working with floating point numbers
GreaterThanConstraint<TExpected> Tests whether a value is greater than the value supplied to its constructor
GreaterThanOrEqualConstraint<TExpected> Tests whether a value is greater than or equal to the value supplied to its constructor
InstanceOfTypeConstraint InstanceOfTypeConstraint is used to test that an object is of the same type provided or derived from it.
ItemsConstraintExpression An extension of ResolvableConstraintExpression that adds a no-op Items property for readability.
LessThanConstraint<TExpected> Tests whether a value is less than the value supplied to its constructor
LessThanOrEqualConstraint<TExpected> Tests whether a value is less than or equal to the value supplied to its constructor
MessageWriter MessageWriter is the abstract base for classes that write constraint descriptions and messages in some form. The class has separate methods for writing various components of a message, allowing implementations to tailor the presentation as needed.
MsgUtils Static methods used in creating messages
NoItemConstraint NoItemConstraint applies another constraint to each item in a collection, failing if any of them succeeds.
NotConstraint NotConstraint negates the effect of some other constraint
NullConstraint NullConstraint tests that the actual value is null
Numerics The Numerics class contains common operations on numeric values.
OrConstraint OrConstraint succeeds if either member succeeds{{
PrefixConstraint Abstract base class used for prefixes
PropertyConstraint PropertyConstraint extracts a named property and uses its value as the actual value for a chained constraint.
PropertyExistsConstraint PropertyExistsConstraint tests that a named property exists on the object provided through Match. Originally, PropertyConstraint provided this feature in addition to making optional tests on the value of the property. The two constraints are now separate.
RangeConstraint<TExpected> RangeConstraint tests whether two values are within a specified range.
RegexConstraint RegexConstraint can test whether a string matches the pattern provided.
ResolvableConstraintExpression 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.
SameAsConstraint<TExpected> SameAsConstraint tests whether an object is identical to the object passed to its constructor
SomeItemsConstraint SomeItemsConstraint applies another constraint to each item in a collection, succeeding if any of them succeeds.
StartsWithConstraint StartsWithConstraint can test whether a string starts with an expected substring.
StringConstraint StringConstraint is the abstract base for constraints that operate on strings. It supports the IgnoreCase modifier for string operations.
SubstringConstraint SubstringConstraint can test whether a string contains the expected substring.
TCLiteComparer NUnitComparer encapsulates NUnit's default behavior in comparing two objects.
TCLiteEqualityComparer NUnitEqualityComparer encapsulates NUnit's handling of equality tests between objects.
ThrowsConstraint ThrowsConstraint is used to test the exception thrown by a delegate by applying a constraint to it.
ThrowsExceptionConstraint ThrowsExceptionConstraint tests that an exception has been thrown, without any further tests.
ThrowsNothingConstraint ThrowsNothingConstraint tests that a delegate does not throw an exception.
Tolerance The Tolerance class generalizes the notion of a tolerance within which an equality test succeeds. Normally, it is used with numeric types, but it can be used with any type that supports taking a difference between two objects and comparing that difference to a value.
TrueConstraint TrueConstraint tests that the actual value is true
TypeConstraint TypeConstraint is the abstract base for constraints that take a Type as their expected value.
UniqueItemsConstraint UniqueItemsConstraint tests whether all the items in a collection are unique.

Interface Types

Interface Summary
IConstraint Interface implemented by all constraints
IConstraintResult Interface for all constraints
IResolveConstraint The IConstraintExpression interface is implemented by all complete and resolvable constraints and expressions.

Enum Types

Enum Summary
ConstraintStatus ConstraintStatus represents the status of a ConstraintResult returned by a Constraint being applied to an actual value.
ToleranceMode Modes in which the tolerance value for a comparison can be interpreted.

Delegate Types

Delegate Summary
ActualValueDelegate<T> Delegate used to delay evaluation of the actual value to be used in evaluating a constraint