ConditionConstraints test a specific condition and are named for the condition they test. They verify that the actual value satisfies the condition. The following condition helpers are provided.
Tests that a value is Null.
Assert.That( anObject, Is.Null ); Assert.That( anObject, Is.Not.Null );
Tests that a value is true.
Assert.That( condition, Is.True );
Tests that a value is false.
Assert.That( condition, Is.False );
Tests that a value is floating-point NaN.
Assert.That( aDouble, Is.NaN ); Assert.That( aDouble, Is.Not.NaN );
Tests that an object is an empty string, directory or collection.
Assert.That( aString, Is.Empty ); Assert.Thst( dirInfo, Is.Empty ); Assert.That( collection, Is.Empty );
Tests that an array, collection or other IEnumerable is composed of unique items with no duplicates.
Assert.That( collection, Is.Unique );