Re: Is.NullOrEmpty

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <016401c82bac$3fff3bc0$6401a8c0@FERRARI>
It's a minor new feature. I thought of doing it but didn't. My reasoning is
that
with a well-written interface, you should be able to predict whether
something
is null or empty.
 
Currently, you can write Assert.That(firstname, Is.Null | Is.Empty );
 
If you want the feature, put in a request with some explanation of the
situation
in which you don't actually know what to expect. That way it may get a
higher priority.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Simon
Garratt
Sent: Tuesday, November 20, 2007 11:25 AM
To: [email protected]
Subject: [Nunit-users] Is.NullOrEmpty


I need to test if a string is null or an empty string.
 
I can do: 

Assert  

.That(String.IsNullOrEmpty(firstName), Is.True); 

but that doesn't seem to be in the new paradigm.  Is there a better way or
should I make it a feature request?  i.e. Is.NullOrEmpty

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.