Re: Is.NullOrEmpty

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <00e601c82f0f$6a18e350$6401a8c0@FERRARI>
Hi Cory, 

> Charlie Poole wrote:
> > 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.
> 
> FWIW, I think IsNullOrEmpty would be useful. In the short 
> term, if you like the above syntax and are using .NET 3.0, 
> you could probably use extension methods to add an 
> IsNullOrEmpty to Is. I'm just theorizing here and haven't tried that.

I don't know if Simon has requested it yet, but feel free to
do so yourself. Even better, since you're a committer, feel free to 
request it, assign it to yourself and implement it. :-)

Charlie

> --
> Cory Foy
> http://www.cornetdesign.com
> 
> 



-------------------------------------------------------------------------
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/
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.