tags:

views:

12

answers:

1

Within one fixture is it possible to markup tests in such a way that the test-setup is only called for some tests and not for others?

[Test] public void TestWithoutSetup() { .. }
[Test] public void TestWithSetup() { .. }

What would I need to do make the above work?

A: 

There's no attribute to accomplish what you want.

I would suggest refactoring your test cases into two separate classes that inherit base functionality from an abstract test class. Each test class can have its own setup method.

womp