NUnit's Assert.That()
form supports the use of constraints as its second parameter. All constraints provided out of the box by NUnit are available through the static classes Is
, Has
and Does
. Constraints can be combined into fluent expressions using the built in methods And
, Or
and With
. Expressions can be conveniently expanded up using the many methods in ConstraintExpression
, such as AtMost
and Contains
.