Charlie Poole
2008-05-31 09:09:51 UTC
Hi All,
Kelly has pointed out several issues with DataSourceAttribute, all of
which revolve around the fact that the property runs at load time,
which is before the tests are ever executed. This leads to some
potential user confusion, which is not helped by the fact that
the attribute name /sounds like/ data that is input to a test, rather
than a set of parameters used to construct the test.
MbUnit has a long history of using "Factory" in the names of attributes
that create tests. This may be a better naming convention, even though
they seem to have had one or two users confused by the issue as well.
I'm inclined to using it for us as well.
I also think now that limiting the data source (or factory) to be
a static property is too limiting. We should allow properties, methods
or fields and let them be either static or instance. Users will just
need to be aware that the instance creating the test cases is not
necessarily the same as the instance that executes them.
That's the general way I'm looking at modifying this stuff. Any thoughts?
Charlie
* Factory attribute on the property or method providing test cases
*
-------------------------------------------------------------------------
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 has pointed out several issues with DataSourceAttribute, all of
which revolve around the fact that the property runs at load time,
which is before the tests are ever executed. This leads to some
potential user confusion, which is not helped by the fact that
the attribute name /sounds like/ data that is input to a test, rather
than a set of parameters used to construct the test.
MbUnit has a long history of using "Factory" in the names of attributes
that create tests. This may be a better naming convention, even though
they seem to have had one or two users confused by the issue as well.
I'm inclined to using it for us as well.
I also think now that limiting the data source (or factory) to be
a static property is too limiting. We should allow properties, methods
or fields and let them be either static or instance. Users will just
need to be aware that the instance creating the test cases is not
necessarily the same as the instance that executes them.
That's the general way I'm looking at modifying this stuff. Any thoughts?
Charlie
* Factory attribute on the property or method providing test cases
*
-------------------------------------------------------------------------
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/