Constraints

Chris Maddock edited this page Sep 5, 2016 · 10 revisions
Clone this wiki locally

This page lists all the constraints available in NUnit.

Alphabetical List of Constraints

Constraint Name Purpose
AllItemsConstraint
AndConstraint
AssignableFromConstraint
AssignableToConstraint
AttributeConstraint
AttributeExistsConstraint
BinarySerializableConstraint
CollectionContainsConstraint
CollectionEquivalentConstraint
CollectionOrderedConstraint
CollectionSubsetConstraint
CollectionSupersetConstraint
DelayedConstraint
EmptyCollectionConstraint
EmptyConstraint
EmptyDirectoryConstraint
EmptyStringConstraint
EndsWithConstraint
EqualConstraint
ExactCountConstraint
ExactTypeConstraint
FalseConstraint
FileOrDirectoryExistsConstraint
GreaterThanConstraint
GreaterThanOrEqualConstraint
InstanceOfTypeConstraint
LessThanConstraint
LessThanOrEqualConstraint
NaNConstraint
NoItemConstraint
NotConstraint
NullConstraint
OrConstraint
PropertyConstraint
PropertyExistsConstraint
RangeConstraint
RegexConstraint
ReusableConstraint
SameAsConstraint
SamePathConstraint
SamePathOrUnderConstraint
SomeItemsConstraint
StartsWithConstraint
SubPathConstraint
SubstringConstraint
ThrowsConstraint
ThrowsNothingConstraint
TrueConstraint
UniqueItemsConstraint
XmlSerializableConstraint

Constraints by Category

Collection Constraints
Constraint Name Purpose
AllItemsConstraint
CollectionContainsConstraint
CollectionEquivalentConstraint
CollectionOrderedConstraint
CollectionSubsetConstraint
CollectionSupersetConstraint
EmptyCollectionConstraint
ExactCountConstraint
NoItemConstraint
SomeItemsConstraint
UniqueItemsConstraint
Comparison Constraints
Constraint Name Purpose
GreaterThanConstraint
GreaterThanOrEqualConstraint
LessThanConstraint
LessThanOrEqualConstraint
RangeConstraint
Compound Constraints
Constraint Name Purpose
AndConstraint
NotConstraint
OrConstraint
Condition Constraints
Constraint Name Purpose
EmptyConstraint
FalseConstraint
NaNConstraint
NullConstraint
TrueConstraint
File and Directory Constraints
Constraint Name Purpose
EmptyDirectoryConstraint
FileOrDirectoryExistsConstraint
SamePathConstraint
SamePathOrUnderConstraint
SubPathConstraint
String Constraints
Constraint Name Purpose
EmptyStringConstraint
EndsWithConstraint
RegexConstraint
StartsWithConstraint
SubstringConstraint
Type Constraints
Constraint Name Purpose
AssignableFromConstraint
AssignableToConstraint
ExactTypeConstraint
InstanceOfTypeConstraint

See also: