SetUp and TearDown Changes
Existing attributes provide per-test setup and teardown at the fixture level and one-time setup and teardown at the fixture, namespace and assembly levels.
The current set of features is somewhat confusing:
* SetUpFixture seems not very well understood by users in general.
* TestFixtureSetUp and TestFixtureTearDown could do with better names.
* SetUp and TearDown designate per-test setup/teardown within a test fixture, one-time setup/teardown within a setup fixture
For NUnit 3.0 we will standardize the use of attributes for setup and teardown and rename some of them to make their function clearer.
Blueprint information
- Status:
- Not started
- Approver:
- NUnit Developers
- Priority:
- Medium
- Drafter:
- Charlie Poole
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
A few quick thoughts:
- Most/Many users don't know what a Fixture is - this happened when we stop requiring inheritance from a base class
- The existing naming convention is confusing for people coming the java world (Gerard and I - maybe the only two people in the world who switch back and forth).
We might want to consider adopting the JUnit 4.x style naming:
Before/After - for before and after each test
BeforeClass/
BeforeNamespace
BeforeAssembly/
Now it might useful to have one more: BeforeEverythin