Discussion:
Another Little 2.5 Data Testing Issue
Kelly Anderson
2008-05-19 17:37:38 UTC
Permalink
On Mon, May 19, 2008 at 5:01 AM, Charlie Poole
Hi Kelly,
1) What you want to do is not possible, but it appears possible.
Right. That becomes a documentation issue.
2) What you want to do is not possible, but maybe it should be possible.
Possibly. Or some other thing like that.
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?
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.
Charlie
Ok, here's what I wanted to do (before I thought about it)...
[TestFixture]
public void setupDirectory()
{
}
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/
Charlie Poole
2008-05-20 21:35:23 UTC
Permalink
Hi Kelly,
Post by Kelly Anderson
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.
Post by Kelly Anderson
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
Post by Kelly Anderson
Charlie
Ok, here's what I wanted to do (before I thought about it)...
[TestFixture]
public void setupDirectory()
{
}
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
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/
Kelly Anderson
2008-05-20 21:42:47 UTC
Permalink
On Tue, May 20, 2008 at 3:35 PM, Charlie Poole
Hi Kelly,
Post by Kelly Anderson
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.
OK. We'll just keep talking then. :-)
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.
No, where is the bug database?

-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/
Charlie Poole
2008-05-20 21:52:26 UTC
Permalink
Hi Kelly,
Post by Kelly Anderson
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.
No, where is the bug database?
http://sourceforge.net/tracker/?group_id=10749&atid=110749

Charlie



-------------------------------------------------------------------------
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/

Loading...