Back to Nunit

Not Constraint

docs/articles/nunit/writing-tests/constraints/NotConstraint.md

latest402 B
Original Source

Not Constraint

NotConstraint reverses the effect of another constraint. If the base constraint fails, NotConstraint succeeds. If the base constraint succeeds, NotConstraint fails.

Constructor

csharp
NotConstraint()

Syntax

csharp
Is.Not...

Examples of Use

[!code-csharpNotConstraintExamples]