Re: nunit-developer Digest, Vol 22, Issue 23
Gary Evans <[email protected]> Tue, 18 Mar 2008 17:44:09 +0000
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <[email protected]> |
> For dynamic data, I'm thinking of supporting something> like this...> > [TestFixture]> public class DynamicDataSample> {> [Test, DataSource( typeof(MyDataSource)]> public void DivisionTest(double numerator, double denominator,> double result)> {> Assert.AreEqual(result, numerator / denominator, 0.00001);> }> }> > Where MyDataSource is a class provided by the user. I'm> still working on the details of this, so please throw in> your ideas. I'd like to have a typesafe interface for> data, rather than using a string.> > More to come on this - your comments are welcome.>
Hi Charlie,
Passing in a type means that an instance of that type will be instantiated, and using some interface the data will be extracted from that instance.
I think this is good for the in-built DataSource attibute, but the underlying extension point won't rely on that mechanism? I'm of course thinking of my parameterized fixtures, where the test data comes from the instance of the fixture...
Cheers,
Gary
_________________________________________________________________
Latest news and results from MSN’s Dancing on Ice 2008 Special
http://entertainment.uk.msn.com/tv/realitytv/dancing-on-ice/
-------------------------------------------------------------------------
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