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

ApartmentAttribute

Marks a test as needing to be run in a particular threading apartment state. This will cause it to run in a separate thread if necessary.
using System; using System.Threading; namespace NUnit.Framework { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class ApartmentAttribute : PropertyAttribute { public ApartmentAttribute(ApartmentState apartmentState) { Guard.ArgumentValid(apartmentState != ApartmentState.Unknown, "must be STA or MTA", "apartmentState"); base.Properties.Add("ApartmentState", apartmentState); } } }