From ce45574f18b35dc72b80f8138a3b50230e9e2dc3 Mon Sep 17 00:00:00 2001 From: Costin Zaharia Date: Wed, 20 Mar 2024 15:37:19 +0100 Subject: [PATCH] Include the full test class in #if NET --- .../SonarAnalyzer.Test/Rules/SpecifyRouteAttributeTest.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyRouteAttributeTest.cs b/analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyRouteAttributeTest.cs index 219b082ffc4..f0caf58957b 100644 --- a/analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyRouteAttributeTest.cs +++ b/analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyRouteAttributeTest.cs @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#if NET + using SonarAnalyzer.Rules.CSharp; namespace SonarAnalyzer.Test.Rules; @@ -25,7 +27,6 @@ namespace SonarAnalyzer.Test.Rules; [TestClass] public class SpecifyRouteAttributeTest { -#if NET private readonly VerifierBuilder builder = new VerifierBuilder() .WithOptions(ParseOptionsHelper.FromCSharp12) .AddReferences([ @@ -39,5 +40,6 @@ public class SpecifyRouteAttributeTest [TestMethod] public void SpecifyRouteAttribute_CS() => builder.AddPaths("SpecifyRouteAttribute.cs").Verify(); -#endif } + +#endif