-
Notifications
You must be signed in to change notification settings - Fork 157
EmptyConstraint
Chris Maddock edited this page May 27, 2017
·
8 revisions
EmptyConstraint tests that an object is an empty string, directory or collection.
EmptyConstraint()
Is.Empty
Assert.That( aString, Is.Empty );
Assert.That( dirInfo, Is.Empty );
Assert.That( collection, Is.Empty );
- EmptyConstraint creates and uses either an EmptyStringConstraint, EmptyDirectoryConstraint or EmptyCollectionConstraint depending on the argument tested.
- A
DirectoryInfo
argument is required in order to test for an empty directory. To test whether a string represents a directory path, you must first construct aDirectoryInfo
.
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0
-
NUnit
-
Release Notes
-
License
- Getting Started
- Writing Tests
- Running Tests
- Extending NUnit
- Technical Notes
-
Release Notes
- NUnit Xamarin Runners
- VS Test Adapter
- VS Test Generator
- NUnit Analyzers