Skip to content

EmptyDirectoryConstraint

jnm2 edited this page Jun 14, 2017 · 4 revisions

The EmptyDirectoryConstraint tests if a Directory is empty.

Constructor

EmptyDirectoryConstraint()

Syntax

Is.Empty

Examples of Use

Assert.That(new DirectoryInfo(actual), Is.Empty);
Assert.That(new DirectoryInfo(actual), Is.Not.Empty);

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

Clone this wiki locally