From c6eec2d664f35ac34d24c07b5da9a96cae34c496 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Tue, 5 Mar 2024 13:28:29 -0600 Subject: [PATCH] Test update to remove suppression --- .../Unit/NimbleAnchorBaseTests.cs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs index bf89fc3111..55931d99ec 100644 --- a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs +++ b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq.Expressions; using Bunit; using Xunit; @@ -12,22 +11,19 @@ namespace NimbleBlazor.Tests.Unit; public abstract class NimbleAnchorBaseTests where T : NimbleAnchorBase { [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1000:Do not declare static members on generic types", Justification = "Static needed for MemberData of Theory")] - public static IEnumerable Data => - new List + public static TheoryData>, string> Data => new() { - new object[] { (Expression>)(x => x.Href), "href" }, - new object[] { (Expression>)(x => x.HrefLang), "hreflang" }, - new object[] { (Expression>)(x => x.Ping), "ping" }, - new object[] { (Expression>)(x => x.ReferrerPolicy), "referrerpolicy" }, - new object[] { (Expression>)(x => x.Rel), "rel" }, - new object[] { (Expression>)(x => x.Target), "target" }, - new object[] { (Expression>)(x => x.Type), "type" } + { x => x.Href, "href" }, + { x => x.HrefLang, "hreflang" }, + { x => x.Ping, "ping" }, + { x => x.ReferrerPolicy, "referrerpolicy" }, + { x => x.Rel, "rel" }, + { x => x.Target, "target" }, + { x => x.Type, "type" } }; [Theory] -#pragma warning disable xUnit1042 // The member referenced by the MemberData attribute returns untyped data rows [MemberData(nameof(Data))] -#pragma warning restore xUnit1042 // The member referenced by the MemberData attribute returns untyped data rows public void NimbleAnchorBase_AttributeIsSet(Expression> propertyGetter, string markupName) { var anchorMenuItem = RenderWithPropertySet(propertyGetter, "foo");