Re: Another Little 2.5 Data Testing Issue

"Charlie Poole" <[email protected]> Tue, 20 May 2008 23:35:23 +0200
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <004601c8bac1$6b26ab90$660d0c0a@ferrari>
Hi Kelly, 

> > I would like to make it clear that it is not possible in the static 
> > case while making it possible in the dynamic case, but I'm not sure 
> > how to do it yet.
> 
> When you say "dynamic case" are you referring to a case where 
> you dynamically instantiate the testFixture class instance 
> and then invoke functions on it like I do in IterativeTest, 
> or are you referring to some other dynamicness?

Until I find some better words, I'm continuing to use dynamic to mean
tests that do not exist until we actually start to run the parent test
and which therefore can't be seen (initially) in the tree.
 
> > One issue to bear in mind is that putting the method in the test 
> > fixture class is what makes it appear that TestFixtureSetUp 
> should work this way.
> > That's one reason I prefer to put it in a different class.
> 
> Perhaps. One of the things that I want to accomplish in all 
> of this is to make it easy to use and learn. The separate 
> classes seem to work against that a bit. IterativeTest took a 
> VERY simple approach, perhaps TOO simple, but I wonder if 
> there might be some happier ground in the middle somewhere. 
> Figuring out where to draw the line is a bit tricky to be sure.

I'm not trying for any single ground. I think we can have the
high ground and the lowlands as well. That's the point of the
static/dynamic distinction I keep making.

BTW, have you filed this as a bug? I no longer have the note
to which this is a  follow-up, so it can easily be forgotten.

Charlie
 
> > Charlie
> >
> >> Ok, here's what I wanted to do (before I thought about it)...
> >>
> >> [TestFixture]
> >> public void setupDirectory()
> >> {
> >>   SetStandardDirectoryRoot(@"C:\kelly");
> >> }
> >>
> >> IEnumerable MyFiles
> >> {
> >>    // make and return a list of the files in C:\Kelly }
> >>
> >> [DataSource("MyFiles")]
> >> public void test()
> >> {
> >>   // Tests something about the files.
> >> }
> 
> --------------------------------------------------------------
> -----------
> 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/