-
Notifications
You must be signed in to change notification settings - Fork 158
Assert.IsEmpty
Charlie Poole edited this page Jan 31, 2016
·
5 revisions
Assert.IsEmpty may be used to test either a string or a collection or IEnumerable. When used with a string, it succeeds if the string is the empty string. When used with a collection, it succeeds if the collection is empty.
Assert.IsEmpty( string aString );
Assert.IsEmpty( string aString, string message, params object[] args );
Assert.IsEmpty( IEnumerable collection );
Assert.IsEmpty( IEnumerable collection, string message,
params object[] args );
Note: When used with an IEnumerable that is not also an ICollection, Assert.IsEmpty attempts to enumerate the contents. It should not be used in cases where this results in an unwanted side effect.
####See also...
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