From d97dcf1d75f825f094dd7a6f03f3679ff7de04a8 Mon Sep 17 00:00:00 2001 From: Joshua Harms Date: Mon, 29 Jan 2024 08:58:14 -0600 Subject: [PATCH] Clean up warnings in test file --- .../Infrastructure/CloneableRequestMessageTests.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ShopifySharp.Tests/Infrastructure/CloneableRequestMessageTests.cs b/ShopifySharp.Tests/Infrastructure/CloneableRequestMessageTests.cs index 509cd5e1..80015e37 100644 --- a/ShopifySharp.Tests/Infrastructure/CloneableRequestMessageTests.cs +++ b/ShopifySharp.Tests/Infrastructure/CloneableRequestMessageTests.cs @@ -3,12 +3,12 @@ using System.Text; using System.IO; using System.Net.Http; -using System.Net.Http.Headers; using System.Threading.Tasks; using FluentAssertions; using JetBrains.Annotations; using ShopifySharp.Infrastructure; using Xunit; +#pragma warning disable CS0618 // Type or member is obsolete namespace ShopifySharp.Tests.Infrastructure; @@ -401,12 +401,9 @@ public async Task Dispose_ShouldDisposeAfterBeingCloned() baseRequest.Disposed.Should().BeFalse(); } - class TestCloneableRequestMessage : CloneableRequestMessage + private class TestCloneableRequestMessage(Uri url, HttpMethod method, HttpContent? content = null) + : CloneableRequestMessage(url, method, content) { - public TestCloneableRequestMessage(Uri url, HttpMethod method, HttpContent? content = null) : base(url, method, content) - { - } - public bool Disposed { get; private set; } protected override void Dispose(bool disposing)