tags:

views:

48

answers:

2

I have a test , where i do not need to run the setup method (attributed with [SetUp] ) before running the test.I need the setup method to be run for other tests.

Is there any attribute/otherway of achieving this?Is this supported by Nunit?

+2  A: 

You should create a new class for that test which has only the setup (or lack of setup) that it needs.

Alternatively, you could unfactor the setup code into a method that all the other tests call, but I don't recommend this approach.

Michael Haren
A: 

I don't believe you can do that, it would involve knowing what test was about to run which I don't think is possible.

I'd suggest you put it within a different [TestFixture]

AdaTheDev