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

SetCultureAttribute

Summary description for SetCultureAttribute.
using NUnit.Framework.Interfaces; using NUnit.Framework.Internal; using System; using System.Globalization; namespace NUnit.Framework { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class SetCultureAttribute : PropertyAttribute, IApplyToContext { private string _culture; public SetCultureAttribute(string culture) : base("SetCulture", culture) { _culture = culture; } void IApplyToContext.ApplyToContext(TestExecutionContext context) { context.CurrentCulture = new CultureInfo(_culture); } } }