Re: Data-driven Tests in NUnit 2.5
Andreas Schlapsi <[email protected]> Wed, 19 Mar 2008 23:47:31 +0100
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <1205966851.15494.40.camel@olorun> |
Am Mittwoch, dem 19.03.2008, 11:39 -0600 schrieb Kelly Anderson:
> > 4) Test already takes an argument: the description.
>
> This is probably the kicker if the description argument would be
> confused with the parameters argument, which I suppose it would in the
> case where the test has one string parameter. We don't have tests with
> parameters at this point in any other context do we? We could (if we
> wanted to) differentiate between
>
> [Test("This test does stuff!")]
> public void AnOldTest()
> {
> }
>
> and
>
> [Test("Kelly Anderson")]
> public void ANewTest(string name)
> {
> }
>
> by looking at the metadata, and seeing that it has a parameter. It's a
> bit subtle... but I think I prefer this as every other attribute used
> inside of a TestFixture aside from Test doesn't run as a test, but is
> rather a special case. This isn't a special case like SetUp or
> TearDown, at least it doesn't seem the same to me.
I think this is hard to understand for users. I prefer the
TestCaseAttribute.
Andreas
-------------------------------------------------------------------------
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/