<PackageReference Include="NUnit" Version="4.1.0" />

OneTimeSetUpCommand

OneTimeSetUpCommand runs any one-time setup methods for a suite, constructing the user test object if necessary.
using System.Runtime.CompilerServices; namespace NUnit.Framework.Internal.Commands { public class OneTimeSetUpCommand : BeforeTestCommand { [System.Runtime.CompilerServices.NullableContext(1)] public OneTimeSetUpCommand(TestCommand innerCommand, SetUpTearDownItem setUpTearDown) : base(innerCommand) { Guard.ArgumentValid(base.Test is TestSuite && base.Test.TypeInfo != null, "OneTimeSetUpCommand must reference a TestFixture or SetUpFixture", "innerCommand"); BeforeTest = delegate(TestExecutionContext context) { setUpTearDown.RunSetUp(context); }; } } }