Re: NUnit 2.5: What's In It Now
"Charlie Poole" <[email protected]> Thu, 10 Apr 2008 15:56:10 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <000001c89b5e$138da460$6401a8c0@ferrari> |
Hi Gary,
I like this :) it is a bit limiting that an assertion failure prevents the
rest of the test from running, in some cases. I say some cases 'cause a lot
of tests are written at the minute that rely on this functionality.
If we're in a loop checking inputs against expected output, you might be
interested in all of the loop results - whether successful or not. But in
other tests a failure at the top of a test may mean that there's not much
point carrying on.
But then again, maybe Assert.That should return the result of the condition,
so you could have
if (!Assert.That(myCondition))
{
// there's not much point continuing the test
return;
}
That puts it in the user's hands, which is good, but requires an if test.
My thought was to have
1) a way to report ongoing progress without returning
2) a way to return "twice" from within an Assert or other call
The first is fairly easy - some sort of list of intermediate results that
is maintained in the framework and accessed from the core via
reflection - it could use only built-in .NET types to avoid any
versioning issues.
The second is either hard or impossible. :-) You can do it
by stack manipulation in unmanaged code, but I think it
would require a .NET facility to make it happen in
managed code.
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
_______________________________________________
nunit-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-developer