nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01824
Re: [Bug 809947] Re: SetUpFixture with parameter
That's clear.
It seems like we would want more than just Ignore though.
In your example, the entire suite of tests would be listed as
Ignored - however many test cases it had - and the overall
result would be a warning.
Perhaps that works in your case, but I imagine some folks
would prefer to use a Category so that the 'GiantDb' tests
could be silently skipped.
Charlie
On Thu, Jul 21, 2011 at 10:04 AM, Rechenelf <809947@xxxxxxxxxxxxxxxxxx> wrote:
> Sorry for being late
>
> [TestFixture("GiantDb", "DbPass", IgnoreReason="does not work")]
> [TestFixture("SmallDb", "DbPass")]
> public class MultiDbTest
> {
> public MultiDbTest (string dbName, string dbPass)
> {
> // store connection data
> }
>
> [SetUp]
> public SetUp()
> {
> // connect to database
> }
> ...
> }
>
> Would run all tests twice, on for GiantDb (but ignored) and for SmallDb.
>
> So what I want to have is the same feature for the whole namespace. I
> don't want a database connect for every class (because does need a long
> time). This can I solve with a class attributed with SetUpFixture, but
> only for one database. I want to give more databases, something like the
> following. And all tests in the namespace will run twice.
>
> [SetUpFixture ("GiantDb", "DbPass", IgnoreReason="does not work")]
> [SetUpFixture ("SmallDb", "DbPass")]
> public class MultiDbTest
> {
> public MultiDbTest (string dbName, string dbPass)
> {
> // store connection data
> }
>
> [SetUp]
> public SetUp()
> {
> // connect to database
> }
> ...
> }
>
> Is it clear?
>
> --
> You received this bug notification because you are subscribed to NUnit
> Framework.
> https://bugs.launchpad.net/bugs/809947
>
> Title:
> SetUpFixture with parameter
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunit-3.0/+bug/809947/+subscriptions
>
--
You received this bug notification because you are a member of NUnit
Core Developers, which is the registrant for NUnit Framework.
https://bugs.launchpad.net/bugs/809947
Title:
SetUpFixture with parameter
Status in NUnit Test Framework:
New
Bug description:
SetUpFixture should have the same possibilities with paramater as
TextFixture, so that the class can have constructors with parameters.
[TestFixture("GiantDb", "DbPass", IgnoreReason="does not work")]
[TestFixture("SmallDb", "DbPass")]
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/809947/+subscriptions
References