Re: NUnit 2.5: What's In It Now

"Charlie Poole" <[email protected]> Thu, 10 Apr 2008 12:18:18 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <01c801c89b3f$a427b610$6401a8c0@ferrari>
 Hi Kelly,

> You're hard to read sometimes. :-)  That's all.

I work hard to have no hidden meanings beyond what I say. 
Oddly, that sometimes confuses folks.
 
> >  Probably. But it's not the main point IMO. As a user, I  
> don't throw 
> > an exception. I just Assume something. You're  saying "As a user, I 
> > want to be able to make an assumption  and have it verified. If it 
> > succeeds, the test continues.
> >  If it fails, the test terminates and succeeds." This  
> doesn't make a 
> > lot of sense.
> 
> Why not? That's what Assume means in all the literature. The 
> only variant is that if the test terminates in ALL cases of 
> testing the Theory, then it is not a success.

I don't think so. I believe you are mixing two things here:
the Theory and the method that runs the test. NUnit need not
know about the individual method results - depending on the
implementation. That's not to say we don't care about the
data on which the theory failed - we want to know that - 
but we don't have to consider every invocation of the 
method a test.

You may recall I wrote about this alternative to creating
multiple tests in an earlier thread.

> >  > Succeed.If(Is.EqualTo(f));
> >
> >  For that example, you could do
> >         if ( a == b ) Assert.Succeed();  but yes, I can see that a 
> > constraint syntax might be useful  for some cases.
> 
> It might also be nice to:
> 
> Assert.Fail(Constraint);
> 
> and so forth, but it does lead to the rather ungrammatic:
> 
> Assert.Fail(Is.EqualTo(4));

Not clear what you're comparing 4 to here.

Anyway, we have that already. You write it
  Assert.That(x, Is.EqualTo(4));
 
Charlie



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone