Re: Fwd: Fwd: Assume
"Daniel M. Pomerantz" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Just brainstorming here.... Right now the runners have three results: Pass, Fail, and Did Not Run. Sorta like a nullable Boolean. I don't see that the runner would have to alter that at all. If the Assumptions fail, then this test falls into the "Did Not Run" category. If some one chose to use ASSumptions rather than ASSerts, then this is the desired results, and it's up to the developer to deal with it. If they wanted a failure, they would not have used ASSume. I can see potential bennefit of eiter wrapping a Test inside of another so that the outter test only passes if the second one runs, but then I wonder, why bother going through all those hoops if the end result was /a/ failing test. Then there's the question of should a continuous build system report these skipped tests any differently than other skipped tests. I just don't see if. Maybe I'm not seeing the big picture, but if a developer wanted a test with invalid data to fail, he would use Assert. If he wants it to skip, this gives him an option that wasn't previously there. Please feel free to tell me what I've overlooked something. I thought of something else which may or may not be helpful here. Extending the theme created by the ExpectedException and Expicit attributes, I thought a [Conditional] attribute might be helpful. It might serve no purpose other than information, but if a test is decorated as Conditional, Assumptions cause a "Not-Run" situation. If the method is not decorated as such, ASSumptions cause a failure. Any bennefit seen here? dmp Vaughn, Clifton wrote: > I've read one paper, but I don't recall it explaining great detail about > the Assume.That. I was still left with the question of how the runner > would indicate that the data didn't meet an assumption when you expected > it to. Maybe I'm still missing something though. > > Thanks > > cliff > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Kelly Anderson > Sent: Friday, February 15, 2008 3:14 PM > To: [email protected] > Subject: Re: [nunit-developer] Fwd: Fwd: Assume > > On Fri, Feb 15, 2008 at 11:29 AM, Vaughn, Clifton > <[email protected]> wrote: > >> I don't think it needs to cause an error, but it should signal that >> > the > >> data didn't meet the assumptions unless along with the data you >> > included > >> a flag to signal when an error should be thrown. >> >> Either a signature like this: >> >> Check.That(meetsAssumptions, 2+2, Is.EqualTo(data) ) >> >> Or meetsAssumptions is added as a condition. >> >> Thanks >> > > Cliff, out of curiosity, have you read any of the Theory papers yet? I > am curious only as to the context of your comment. > > -Kelly > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > nunit-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-developer > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > nunit-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-developer > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/