Last active
April 15, 2021 17:41
-
-
Save adamvlasak/89b99dbb0a5740290fb3bef5befc5ce9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
[SetUpFixture] | |
public class RootFixtureSetup | |
{ | |
[OneTimeSetUp] | |
public void OneTimeSetUp() => TestContext.Progress.WriteLine("RootFixtureSetup:OneTimeSetUp"); | |
[OneTimeTearDown] | |
public void OneTimeTearDown() => TestContext.Progress.WriteLine("RootFixtureSetup:OneTimeTearDown"); | |
} | |
namespace TestLifeCycle | |
{ | |
[SetUpFixture] | |
public class FixtureSetup | |
{ | |
[OneTimeSetUp] | |
public void OneTimeSetUp() => TestContext.Progress.WriteLine("FixtureSetup:OneTimeSetUp"); | |
[OneTimeTearDown] | |
public void OneTimeTearDown() => TestContext.Progress.WriteLine("FixtureSetup:OneTimeTearDown"); | |
} | |
[TestFixture] | |
public class Tests | |
{ | |
[OneTimeSetUp] | |
public void OneTimeSetUp() => TestContext.Progress.WriteLine("Tests:OneTimeSetUp"); | |
[SetUp] | |
public void Setup() => TestContext.Progress.WriteLine("Tests:SetUp"); | |
public Tests() => TestContext.Progress.WriteLine("Tests:Constructor"); | |
[Test] | |
public void Test1() => TestContext.Progress.WriteLine("Tests:Test1"); | |
[Test] | |
public void Test2() => TestContext.Progress.WriteLine("Tests:Test2"); | |
[TearDown] | |
public void TearDown() => TestContext.Progress.WriteLine("Tests:TearDown"); | |
[OneTimeTearDown] | |
public void OneTimeTearDown() => TestContext.Progress.WriteLine("Tests:OneTimeTearDown"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.