From fe631c8b90c099cdf63f565f53384674c08d1bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Mon, 16 Dec 2024 22:15:08 +0100 Subject: [PATCH] chore: Allow AttributeTargets Assembly for `SetCulture` and `SetUICulture` (#557) --- .../Internal/CultureAttributeBase.cs | 2 +- src/NetEvolve.Extensions.XUnit/SetCultureAttribute.cs | 5 ++++- src/NetEvolve.Extensions.XUnit/SetUICultureAttribute.cs | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/NetEvolve.Extensions.XUnit/Internal/CultureAttributeBase.cs b/src/NetEvolve.Extensions.XUnit/Internal/CultureAttributeBase.cs index 383b3d3..76313b4 100644 --- a/src/NetEvolve.Extensions.XUnit/Internal/CultureAttributeBase.cs +++ b/src/NetEvolve.Extensions.XUnit/Internal/CultureAttributeBase.cs @@ -10,7 +10,7 @@ /// Provides basic functionality for culture-based testing. /// [AttributeUsage( - AttributeTargets.Class | AttributeTargets.Method, + AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true )] diff --git a/src/NetEvolve.Extensions.XUnit/SetCultureAttribute.cs b/src/NetEvolve.Extensions.XUnit/SetCultureAttribute.cs index 7c63355..5d1ad84 100644 --- a/src/NetEvolve.Extensions.XUnit/SetCultureAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/SetCultureAttribute.cs @@ -8,7 +8,10 @@ /// /// Based on the value passed as culture, the marked test is executed. /// -[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false)] +[AttributeUsage( + AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, + Inherited = false +)] public sealed class SetCultureAttribute : CultureAttributeBase { private readonly CultureInfo _uiCulture; diff --git a/src/NetEvolve.Extensions.XUnit/SetUICultureAttribute.cs b/src/NetEvolve.Extensions.XUnit/SetUICultureAttribute.cs index d4f6c27..ddca5d1 100644 --- a/src/NetEvolve.Extensions.XUnit/SetUICultureAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/SetUICultureAttribute.cs @@ -7,7 +7,10 @@ /// /// Based on the value passed as UI culture, the marked test is executed. /// -[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false)] +[AttributeUsage( + AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, + Inherited = false +)] public sealed class SetUICultureAttribute : CultureAttributeBase { ///