NUnit.Framework.Constraints
Namespace with 134 public types
Classes
AllItemsConstraint
AllOperator
AndConstraint
AndOperator
AnyOfConstraint
AssignableFromConstraint
AssignableFromConstraint`1
AssignableToConstraint
AssignableToConstraint`1
AttributeConstraint
AttributeExistsConstraint
AttributeOperator
CollectionEquivalentConstraint
CollectionEquivalentConstraintResult
CollectionOrderedConstraint
CollectionSubsetConstraint
CollectionSupersetConstraint
CollectionTally
CollectionTallyResult
ConstraintBuilder
ConstraintExpression
ConstraintResult
ContainsConstraint
CountZeroConstraint
DefaultConstraint
DelayedConstraint
DictionaryContainsKeyConstraint
DictionaryContainsKeyValuePairConstraint
DictionaryContainsValueConstraint
EmptyCollectionConstraint
EmptyConstraint
EmptyDirectoryConstraint
EmptyGuidConstraint
EmptyStringConstraint
EndsWithConstraint
EqualConstraint
EqualConstraint`1
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.
EqualConstraintResult
The EqualConstraintResult class is tailored for formatting
and displaying the result of an EqualConstraint.
EqualDateTimeOffsetConstraint
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.
EqualDateTimeOffsetConstraintWithSameOffset
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.
EqualNumericConstraint`1
EqualNumericConstraint 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.
EqualNumericWithoutUsingConstraint`1
EqualNumericConstraint 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.
EqualStringConstraint
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.
EqualStringWithoutUsingConstraint
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.
EqualTimeBaseConstraint`1
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.
EqualTimeBasedConstraintWithNumericTolerance`1
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.
EqualTimeBasedConstraintWithTimeSpanTolerance`1
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.
EqualUsingConstraint`1
EqualUsingConstraint where the comparison is done by a user supplied comparer.
ExactCountConstraint
ExactCountConstraint applies another constraint to each
item in a collection, succeeding only if a specified
number of items succeed.
ExactCountOperator
Represents a constraint that succeeds if the specified
count of members of a collection match a base constraint.
ExactTypeConstraint
ExactTypeConstraint is used to test that an object
is of the exact type provided in the constructor
ExactTypeConstraint`1
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.
ExceptionTypeConstraint`1
ExceptionTypeConstraint is a special version of ExactTypeConstraint
used to provided detailed info about the exception thrown in
an error message.
FalseConstraint
FalseConstraint tests that the actual value is false
FileOrDirectoryExistsConstraint
FileOrDirectoryExistsConstraint is used to determine if a file or directory exists
GreaterThanConstraint
Tests whether a value is greater than the value supplied to its constructor
GreaterThanOrEqualConstraint
Tests whether a value is greater than or equal to the value supplied to its constructor
IndexerConstraint
IndexerConstraint extracts a named property and uses
its value as the actual value for a chained constraint.
IndexerOperator
Operator used to test for the presence of a Indexer
on an object and optionally apply further tests to the
value of that indexer.
InstanceOfTypeConstraint
InstanceOfTypeConstraint is used to test that an object
is of the same type provided or derived from it.
InstanceOfTypeConstraint`1
InstanceOfTypeConstraint is used to test that an object
is of the same type provided or derived from it.
InsteadOperator
Operator that replaces the left constraint with the right constraint
Interval
Keeps track of an interval time which can be represented in
Minutes, Seconds or Milliseconds
ItemsConstraintExpression
An extension of ResolvableConstraintExpression that adds a no-op Items property for readability.
LessThanConstraint
Tests whether a value is less than the value supplied to its constructor
LessThanOrEqualConstraint
Tests whether a value is less than or equal to the value supplied to its constructor
MultipleOfConstraint
MultipleOfConstraint tests that the actual value is a multiple of a specified integer.
NaNConstraint
NaNConstraint tests that the actual value is a double or float NaN
NoItemConstraint
NoItemConstraint applies another constraint to each
item in a collection, failing if any of them succeeds.
NoneOperator
Represents a constraint that succeeds if none of the
members of a collection match a base constraint.
NotConstraint
NotConstraint negates the effect of some other constraint
NotOperator
Negates the test of the constraint it wraps.
NullConstraint
NullConstraint tests that the actual value is null
NUnitComparer
NUnitComparer encapsulates NUnit's default behavior
in comparing two objects.
NUnitEqualityComparer
NUnitEqualityComparer encapsulates NUnit's handling of
equality tests between objects.
OrConstraint
OrConstraint succeeds if either member succeeds
OrOperator
Operator that requires at least one of its arguments to succeed
PredicateConstraint`1
Predicate constraint wraps a Predicate in a constraint,
returning success if the predicate is true.
PropertiesComparerConfiguration
Class to configure how to compare properties
PropertiesComparerConfiguration`1
Generic version of to allow
specifiying properties using expression syntax instead of strings.
PropertiesComparerConfigurationUntyped
Class to configure how to compare properties. Non-generic untyped version.
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.
PropOperator
Operator used to test for the presence of a named Property
on an object and optionally apply further tests to the
value of that property.
RangeConstraint
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.
ReusableConstraint
ReusableConstraint wraps a constraint expression after
resolving it so that it can be reused consistently.
SameAsConstraint`1
SameAsConstraint tests whether an object is identical to
the object passed to its constructor
SamePathConstraint
Summary description for SamePathConstraint.
SamePathOrUnderConstraint
SamePathOrUnderConstraint tests that one path is under another
SomeItemsConstraint
SomeItemsConstraint applies another constraint to each
item in a collection, succeeding if any of them succeeds.
SomeItemsConstraint`1
SomeItemsConstraint applies another constraint to each
item in a collection, succeeding if any of them succeeds.
SomeOperator
Represents a constraint that succeeds if any of the
members of a collection match a base constraint.
StartsWithConstraint
StartsWithConstraint can test whether a string starts
with an expected substring.
SubPathConstraint
SubPathConstraint tests that the actual path is under the expected path
SubstringConstraint
SubstringConstraint can test whether a string contains
the expected substring.
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.
ThrowsOperator
Operator that tests that an exception is thrown and
optionally applies further tests to the 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
UniqueItemsConstraint
UniqueItemsConstraint tests whether all the items in a
collection are unique.
WhiteSpaceConstraint
WhiteSpaceConstraint tests whether a string contains white space.
WithOperator
Represents a constraint that simply wraps the
constraint provided as an argument, without any
further functionality, but which modifies the
order of evaluation because of its precedence.
XmlSerializableConstraint
XmlSerializableConstraint tests whether
an object is serializable in XML format.
Enumerations
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.
Static Classes
DateTimes
The DateTimes class contains common operations on Date and Time values.
Abstract Classes
BinaryConstraint
BinaryConstraint is the abstract base of all constraints
that combine two other constraints in some fashion.
BinaryOperator
Abstract base class for all binary operators
CollectionConstraint
CollectionConstraint is the abstract base class for
constraints that operate on collections.
CollectionItemsEqualConstraint
CollectionItemsEqualConstraint is the abstract base class for all
collection constraints that apply some notion of item equality
as a part of their operation.
CollectionOperator
Abstract base for operators that indicate how to
apply a constraint to items in a collection.
ComparisonAdapter
ComparisonAdapter class centralizes all comparisons of
values in NUnit, adapting to the use of any provided
,
or .
ComparisonConstraint
Abstract base class for constraints that compare values to
determine if one is greater than, equal to or less than
the other.
Constraint
The Constraint class is the base of all built-in constraints
within NUnit. It provides the operator overloads used to combine
constraints.
ConstraintOperator
The ConstraintOperator class is used internally by a
ConstraintBuilder to represent an operator that
modifies or combines constraints.
Constraint operators use left and right precedence
values to determine whether the top operator on the
stack should be reduced before pushing a new operator.
EqualityAdapter
EqualityAdapter class handles all equality comparisons
that use an ,
or a .
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.
PathConstraint
PathConstraint serves as the abstract base of constraints
that operate on paths and provides several helper methods.
PrefixConstraint
Abstract base class used for prefixes
PrefixOperator
PrefixOperator takes a single constraint and modifies
its action in some way.
SelfResolvingOperator
Abstract base class for operators that are able to reduce to a
constraint whether or not another syntactic element follows.
StringConstraint
StringConstraint is the abstract base for constraints
that operate on strings. It supports the IgnoreCase
modifier for string operations.
TypeConstraint
TypeConstraint is the abstract base for constraints
that take a Type as their expected value.
TypeConstraint`1
TypeConstraint is the abstract base for constraints
that take a Type as their expected value.
Interfaces
IConstraint
Interface for all constraints
IEnumerableConstraint
Interface for enumerable constraints
IResolveConstraint
The IResolveConstraint interface is implemented by all
complete and resolvable constraints and expressions.