Re: Tearing down when SetUp fails?
"Kelly Anderson" <[email protected]> Thu, 18 Sep 2008 10:05:37 -0600
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Sep 17, 2008 at 3:29 PM, Charlie Poole <[email protected]> wrote: > Hi Kelly, > >> Ok Charlie, I totally understand the SetUp TearDown thing in >> the inheritance model. That makes sense, because it's just >> like constructors and destructors (at least in C++, let's not >> get into the weird end of life of C# objects) and the order >> they are executed makes sense because of that prior >> experience. I think I've done this myself, in fact. It was useful. > > I undersand what you mean. And it's a fairly natural way to think > as well - which is why folks asked for it. Agreed. >> That being said, if you have two SetUps in the same class, I >> would assume they are all executed prior to calling each >> test. But how do you know which one is executed first? Or >> must the order of execution not matter to be safe? > > My answer is that it must not matter. This will, of course, > need to be documented. Would be a good thing to stick in the NUnit Wiki... if there is one. -Kelly ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/