FixtureLifeCycleAttribute public sealed class FixtureLifeCycleAttribute : NUnitAttribute, IApplyToTest Specify the life cycle of a Fixture Documentation Code using NUnit.Framework.Interfaces; using NUnit.Framework.Internal; using System; using System.Runtime.CompilerServices; namespace NUnit.Framework { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public sealed class FixtureLifeCycleAttribute : NUnitAttribute, IApplyToTest { public LifeCycle LifeCycle { get; } public FixtureLifeCycleAttribute(LifeCycle lifeCycle) { LifeCycle = lifeCycle; } [NullableContext(1)] public void ApplyToTest(Test test) { TestFixture testFixture = test as TestFixture; if (testFixture != null) testFixture.LifeCycle = LifeCycle; } } }