while using nunit with R#, i want to use the Property in the TestContext in the TestFixtureSetUp and i get a null exception.
can’t i use TestContextin the TestFixtureSetUp
while using nunit with R#, i want to use the Property in the TestContext
Share
Why would you be able to use it in the Test Fixture SetUp? This is a method run once per test fixture, not specific to a given test so what would be the meaningful TestContext?
You can use it within a TestSetUp method (which runs before each test) e.g.:
Just to clarify, the code executes:
1. TestFixtureSetUp (no specific test context)
2. TestSetup – Test1 – TestTearDown
3. TestSetup – Test2 – TestTearDown
4. TestSetup – Test3 – TestTearDown
etc
n. TestFixtureTearDown (no specific test context)