Skip to content

EmptyStringConstraint

jnm2 edited this page Jun 14, 2017 · 4 revisions

The EmptyStringConstraint tests if a string is empty.

Constructor

EmptyStringConstraint()

Syntax

Is.Empty

Examples of Use

Assert.That(string.Empty, Is.Empty);
Assert.That("A String", Is.Not.Empty);

Note: Is.Empty actually creates an EmptyConstraint. Subsequently applying it to a string causes an EmptyStringConstraint to be created.

Clone this wiki locally