diff --git a/Engine/Internal/GenHTTP.Engine.Internal.csproj b/Engine/Internal/GenHTTP.Engine.Internal.csproj index 066352703..8e1fb3567 100644 --- a/Engine/Internal/GenHTTP.Engine.Internal.csproj +++ b/Engine/Internal/GenHTTP.Engine.Internal.csproj @@ -15,7 +15,7 @@ - + diff --git a/Modules/Basics/GenHTTP.Modules.Basics.csproj b/Modules/Basics/GenHTTP.Modules.Basics.csproj index ad889371d..4906c9fb6 100644 --- a/Modules/Basics/GenHTTP.Modules.Basics.csproj +++ b/Modules/Basics/GenHTTP.Modules.Basics.csproj @@ -11,7 +11,7 @@ - + diff --git a/Modules/Caching/GenHTTP.Modules.Caching.csproj b/Modules/Caching/GenHTTP.Modules.Caching.csproj index 17fc8753d..77f1e5204 100644 --- a/Modules/Caching/GenHTTP.Modules.Caching.csproj +++ b/Modules/Caching/GenHTTP.Modules.Caching.csproj @@ -13,7 +13,7 @@ - + diff --git a/Modules/DependencyInjection/GenHTTP.Modules.DependencyInjection.csproj b/Modules/DependencyInjection/GenHTTP.Modules.DependencyInjection.csproj index 5e7b6d349..48d9483e5 100644 --- a/Modules/DependencyInjection/GenHTTP.Modules.DependencyInjection.csproj +++ b/Modules/DependencyInjection/GenHTTP.Modules.DependencyInjection.csproj @@ -28,7 +28,7 @@ - + diff --git a/Testing/Acceptance/Adapters/AspNetCore/IntegrationTests.cs b/Testing/Acceptance/Adapters/AspNetCore/IntegrationTests.cs index d3911cae8..d6195350d 100644 --- a/Testing/Acceptance/Adapters/AspNetCore/IntegrationTests.cs +++ b/Testing/Acceptance/Adapters/AspNetCore/IntegrationTests.cs @@ -9,8 +9,6 @@ using Microsoft.Extensions.Logging; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Adapters.AspNetCore; [TestClass] @@ -131,10 +129,10 @@ private static async ValueTask RunApplicationAsync(int port, Act builder.Logging.ClearProviders(); - builder.WebHost.ConfigureKestrel(options => + builder.WebHost.ConfigureKestrel(o => { - options.AllowSynchronousIO = true; - options.Listen(IPAddress.Any, port); + o.AllowSynchronousIO = true; + o.Listen(IPAddress.Any, port); }); var app = builder.Build(); diff --git a/Testing/Acceptance/AssertX.cs b/Testing/Acceptance/AssertX.cs index db071208d..8fa4c831d 100644 --- a/Testing/Acceptance/AssertX.cs +++ b/Testing/Acceptance/AssertX.cs @@ -1,6 +1,5 @@ using System.Net; using System.Text; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance; @@ -30,14 +29,10 @@ public static void DoesNotContain(string searchFor, string? content) public static void EndsWith(string searchFor, string? content) => Assert.IsTrue(content?.EndsWith(searchFor) ?? false); - public static void Single(IEnumerable collection) => Assert.IsTrue(collection.Count() == 1); + public static void Single(IEnumerable collection) => Assert.AreEqual(1, collection.Count()); public static void Empty(IEnumerable? collection) => Assert.IsFalse(collection?.Any() ?? false); - public static void Contains(T value, IEnumerable collection) => Assert.IsTrue(collection.Contains(value)); - - public static void DoesNotContain(T value, IEnumerable collection) => Assert.IsFalse(collection.Contains(value)); - public static void IsNullOrEmpty(string? value) => Assert.IsTrue(string.IsNullOrEmpty(value)); /// @@ -79,4 +74,5 @@ public static async Task AssertStatusAsync(this HttpResponseMessage response, Ht throw new AssertFailedException(builder.ToString()); } } + } diff --git a/Testing/Acceptance/Config.cs b/Testing/Acceptance/Config.cs new file mode 100644 index 000000000..6ce8f748f --- /dev/null +++ b/Testing/Acceptance/Config.cs @@ -0,0 +1 @@ +[assembly: DoNotParallelize] diff --git a/Testing/Acceptance/Engine/BasicTests.cs b/Testing/Acceptance/Engine/BasicTests.cs index a2ce2a676..1e6ef1cd3 100644 --- a/Testing/Acceptance/Engine/BasicTests.cs +++ b/Testing/Acceptance/Engine/BasicTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; @@ -51,7 +50,7 @@ public async Task TestConnectionClose(TestEngine engine) using var response = await runner.GetResponseAsync(request); await response.AssertStatusAsync(HttpStatusCode.NotFound); - Assert.IsTrue(response.Headers.Connection.Contains("Close")); + Assert.Contains("Close", response.Headers.Connection); } [TestMethod] @@ -72,7 +71,7 @@ public async Task TestKeepalive() using var response = await runner.GetResponseAsync(); - Assert.IsTrue(response.Headers.Connection.Contains("Keep-Alive")); + Assert.Contains("Keep-Alive", response.Headers.Connection); } } diff --git a/Testing/Acceptance/Engine/ChunkedContentTest.cs b/Testing/Acceptance/Engine/ChunkedContentTest.cs index 4fa7cc4a3..eaaa0012b 100644 --- a/Testing/Acceptance/Engine/ChunkedContentTest.cs +++ b/Testing/Acceptance/Engine/ChunkedContentTest.cs @@ -1,7 +1,6 @@ using System.Net; using System.Net.Http.Json; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/CompanionTests.cs b/Testing/Acceptance/Engine/CompanionTests.cs index 4a30eb9ba..fb25cc6f6 100644 --- a/Testing/Acceptance/Engine/CompanionTests.cs +++ b/Testing/Acceptance/Engine/CompanionTests.cs @@ -5,8 +5,6 @@ using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Engine; [TestClass] diff --git a/Testing/Acceptance/Engine/ConcernTests.cs b/Testing/Acceptance/Engine/ConcernTests.cs index 922107504..2a8a740bd 100644 --- a/Testing/Acceptance/Engine/ConcernTests.cs +++ b/Testing/Acceptance/Engine/ConcernTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Content; using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/ContentTypeTests.cs b/Testing/Acceptance/Engine/ContentTypeTests.cs index aa2e6fe31..366839211 100644 --- a/Testing/Acceptance/Engine/ContentTypeTests.cs +++ b/Testing/Acceptance/Engine/ContentTypeTests.cs @@ -1,5 +1,4 @@ using GenHTTP.Api.Protocol; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/CookieTests.cs b/Testing/Acceptance/Engine/CookieTests.cs index bb072f041..940e2bf10 100644 --- a/Testing/Acceptance/Engine/CookieTests.cs +++ b/Testing/Acceptance/Engine/CookieTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Basics; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/DeveloperModeTests.cs b/Testing/Acceptance/Engine/DeveloperModeTests.cs index 624bd8653..8bd504d92 100644 --- a/Testing/Acceptance/Engine/DeveloperModeTests.cs +++ b/Testing/Acceptance/Engine/DeveloperModeTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Api.Content; using GenHTTP.Api.Protocol; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; @@ -25,7 +24,7 @@ public async Task TestExceptionsWithTrace(TestEngine engine) using var response = await runner.GetResponseAsync(); - Assert.IsTrue((await response.GetContentAsync()).Contains("at GenHTTP")); + Assert.Contains("at GenHTTP", await response.GetContentAsync()); } /// @@ -42,7 +41,7 @@ public async Task TestExceptionsWithNoTrace(TestEngine engine) using var response = await runner.GetResponseAsync(); - Assert.IsFalse((await response.GetContentAsync()).Contains("at GenHTTP")); + Assert.DoesNotContain("at GenHTTP", await response.GetContentAsync()); } private class ThrowingProvider : IHandler diff --git a/Testing/Acceptance/Engine/EncodingTests.cs b/Testing/Acceptance/Engine/EncodingTests.cs index 678e39b8f..b21bedae9 100644 --- a/Testing/Acceptance/Engine/EncodingTests.cs +++ b/Testing/Acceptance/Engine/EncodingTests.cs @@ -1,6 +1,5 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/FlexibleTypeTests.cs b/Testing/Acceptance/Engine/FlexibleTypeTests.cs index f906805e9..0b6416dbb 100644 --- a/Testing/Acceptance/Engine/FlexibleTypeTests.cs +++ b/Testing/Acceptance/Engine/FlexibleTypeTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Basics; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/ForwardingTests.cs b/Testing/Acceptance/Engine/ForwardingTests.cs index 86d758015..a25c88bbc 100644 --- a/Testing/Acceptance/Engine/ForwardingTests.cs +++ b/Testing/Acceptance/Engine/ForwardingTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Api.Infrastructure; using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/HeaderTests.cs b/Testing/Acceptance/Engine/HeaderTests.cs index 2ed3ad8eb..fa7d048cf 100644 --- a/Testing/Acceptance/Engine/HeaderTests.cs +++ b/Testing/Acceptance/Engine/HeaderTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/HostTests.cs b/Testing/Acceptance/Engine/HostTests.cs index 51ebcec46..7b275d5fb 100644 --- a/Testing/Acceptance/Engine/HostTests.cs +++ b/Testing/Acceptance/Engine/HostTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/Kestrel/CustomizingTests.cs b/Testing/Acceptance/Engine/Kestrel/CustomizingTests.cs index 24828cabd..a272a6d7e 100644 --- a/Testing/Acceptance/Engine/Kestrel/CustomizingTests.cs +++ b/Testing/Acceptance/Engine/Kestrel/CustomizingTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Engine.Kestrel; using GenHTTP.Modules.Layouting; using Microsoft.AspNetCore.Builder; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine.Kestrel; diff --git a/Testing/Acceptance/Engine/Kestrel/LifecycleTests.cs b/Testing/Acceptance/Engine/Kestrel/LifecycleTests.cs index 03fe7e305..169442c7e 100644 --- a/Testing/Acceptance/Engine/Kestrel/LifecycleTests.cs +++ b/Testing/Acceptance/Engine/Kestrel/LifecycleTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine.Kestrel; diff --git a/Testing/Acceptance/Engine/Kestrel/MappingTests.cs b/Testing/Acceptance/Engine/Kestrel/MappingTests.cs index 05e77669a..284dc5d5a 100644 --- a/Testing/Acceptance/Engine/Kestrel/MappingTests.cs +++ b/Testing/Acceptance/Engine/Kestrel/MappingTests.cs @@ -1,7 +1,6 @@ using System.Net; using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine.Kestrel; diff --git a/Testing/Acceptance/Engine/Kestrel/ProtocolTests.cs b/Testing/Acceptance/Engine/Kestrel/ProtocolTests.cs index 01bec414c..a72e3f376 100644 --- a/Testing/Acceptance/Engine/Kestrel/ProtocolTests.cs +++ b/Testing/Acceptance/Engine/Kestrel/ProtocolTests.cs @@ -5,8 +5,6 @@ using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Engine.Kestrel; [TestClass] diff --git a/Testing/Acceptance/Engine/MainHandlerTests.cs b/Testing/Acceptance/Engine/MainHandlerTests.cs index 5c4fd77b0..532b5e331 100644 --- a/Testing/Acceptance/Engine/MainHandlerTests.cs +++ b/Testing/Acceptance/Engine/MainHandlerTests.cs @@ -1,8 +1,6 @@ using GenHTTP.Api.Content; using GenHTTP.Api.Protocol; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - using StringContent = GenHTTP.Modules.IO.Strings.StringContent; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/MethodTests.cs b/Testing/Acceptance/Engine/MethodTests.cs index 562d83cda..7a6cb279e 100644 --- a/Testing/Acceptance/Engine/MethodTests.cs +++ b/Testing/Acceptance/Engine/MethodTests.cs @@ -1,7 +1,6 @@ using System.Net; using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/ParserTests.cs b/Testing/Acceptance/Engine/ParserTests.cs index 732e02f5c..bbac7d4bd 100644 --- a/Testing/Acceptance/Engine/ParserTests.cs +++ b/Testing/Acceptance/Engine/ParserTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Api.Content; using GenHTTP.Api.Protocol; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/PipelineTests.cs b/Testing/Acceptance/Engine/PipelineTests.cs index ef3462ea7..cfaa7bd41 100644 --- a/Testing/Acceptance/Engine/PipelineTests.cs +++ b/Testing/Acceptance/Engine/PipelineTests.cs @@ -1,7 +1,6 @@ using System.Net.Sockets; using System.Text; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/PooledDictionaryTests.cs b/Testing/Acceptance/Engine/PooledDictionaryTests.cs index 9ac5749a7..485c8f8cf 100644 --- a/Testing/Acceptance/Engine/PooledDictionaryTests.cs +++ b/Testing/Acceptance/Engine/PooledDictionaryTests.cs @@ -1,7 +1,5 @@ using GenHTTP.Engine.Shared.Types; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Engine; [TestClass] @@ -35,15 +33,15 @@ public void TestCounts() { using var dict = new PooledDictionary(); - Assert.AreEqual(0, dict.Keys.Count); - Assert.AreEqual(0, dict.Values.Count); + Assert.IsEmpty(dict.Keys); + Assert.IsEmpty(dict.Values); AssertX.Empty(dict); dict["one"] = "one"; - Assert.AreEqual(1, dict.Keys.Count); - Assert.AreEqual(1, dict.Values.Count); + Assert.HasCount(1, dict.Keys); + Assert.HasCount(1, dict.Values); AssertX.Single(dict); } @@ -69,7 +67,7 @@ public void TestResize() dict.Add(new KeyValuePair(i, i)); } - Assert.IsTrue(dict.Capacity > 25); + Assert.IsGreaterThan(25, dict.Capacity); for (var i = 0; i < 25; i++) { @@ -92,4 +90,5 @@ public void TestNoRemove2() Assert.ThrowsExactly(() => dict.Remove(new KeyValuePair("", ""))); } + } diff --git a/Testing/Acceptance/Engine/ProtocolTests.cs b/Testing/Acceptance/Engine/ProtocolTests.cs index 0e5a224da..6da17027f 100644 --- a/Testing/Acceptance/Engine/ProtocolTests.cs +++ b/Testing/Acceptance/Engine/ProtocolTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Basics; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/ResponseTests.cs b/Testing/Acceptance/Engine/ResponseTests.cs index 81370ac46..ebd7c644e 100644 --- a/Testing/Acceptance/Engine/ResponseTests.cs +++ b/Testing/Acceptance/Engine/ResponseTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Basics; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/RoutingTests.cs b/Testing/Acceptance/Engine/RoutingTests.cs index abd146533..9a08ad744 100644 --- a/Testing/Acceptance/Engine/RoutingTests.cs +++ b/Testing/Acceptance/Engine/RoutingTests.cs @@ -1,5 +1,4 @@ using GenHTTP.Api.Routing; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/SecurityTests.cs b/Testing/Acceptance/Engine/SecurityTests.cs index c511d1bfb..1e00e8d49 100644 --- a/Testing/Acceptance/Engine/SecurityTests.cs +++ b/Testing/Acceptance/Engine/SecurityTests.cs @@ -1,13 +1,15 @@ using System.Net; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; + using GenHTTP.Api.Infrastructure; + using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Security; using GenHTTP.Modules.Security.Providers; + using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/SimpleCertificateProviderTest.cs b/Testing/Acceptance/Engine/SimpleCertificateProviderTest.cs index 6b993d6e5..7e1ad1dd1 100644 --- a/Testing/Acceptance/Engine/SimpleCertificateProviderTest.cs +++ b/Testing/Acceptance/Engine/SimpleCertificateProviderTest.cs @@ -1,6 +1,5 @@ using System.Security.Cryptography.X509Certificates; using GenHTTP.Engine.Shared.Security; -using Microsoft.VisualStudio.TestTools.UnitTesting; using NSubstitute; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/Engine/WireTests.cs b/Testing/Acceptance/Engine/WireTests.cs index 5ba4df780..52d0def2e 100644 --- a/Testing/Acceptance/Engine/WireTests.cs +++ b/Testing/Acceptance/Engine/WireTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Engine; diff --git a/Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj b/Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj index 7f376889a..3e6143b0a 100644 --- a/Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj +++ b/Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj @@ -33,10 +33,10 @@ - - + + - + diff --git a/Testing/Acceptance/Modules/ApiBrowsing/ApplicationTests.cs b/Testing/Acceptance/Modules/ApiBrowsing/ApplicationTests.cs index 2ecf83569..0635c9a6a 100644 --- a/Testing/Acceptance/Modules/ApiBrowsing/ApplicationTests.cs +++ b/Testing/Acceptance/Modules/ApiBrowsing/ApplicationTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.OpenApi; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ApiBrowsing; diff --git a/Testing/Acceptance/Modules/ApiBrowsing/HandlerTests.cs b/Testing/Acceptance/Modules/ApiBrowsing/HandlerTests.cs index 2f6f2d5a9..c8bbe4c0c 100644 --- a/Testing/Acceptance/Modules/ApiBrowsing/HandlerTests.cs +++ b/Testing/Acceptance/Modules/ApiBrowsing/HandlerTests.cs @@ -5,7 +5,6 @@ using GenHTTP.Modules.Layouting.Provider; using GenHTTP.Modules.OpenApi; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ApiBrowsing; diff --git a/Testing/Acceptance/Modules/Authentication/ApiKeyAuthenticationTests.cs b/Testing/Acceptance/Modules/Authentication/ApiKeyAuthenticationTests.cs index 320360d5d..8710dff17 100644 --- a/Testing/Acceptance/Modules/Authentication/ApiKeyAuthenticationTests.cs +++ b/Testing/Acceptance/Modules/Authentication/ApiKeyAuthenticationTests.cs @@ -12,8 +12,6 @@ using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Reflection.Injectors; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Authentication; [TestClass] diff --git a/Testing/Acceptance/Modules/Authentication/BasicAuthenticationTests.cs b/Testing/Acceptance/Modules/Authentication/BasicAuthenticationTests.cs index f2f7e7f23..f1a1fb402 100644 --- a/Testing/Acceptance/Modules/Authentication/BasicAuthenticationTests.cs +++ b/Testing/Acceptance/Modules/Authentication/BasicAuthenticationTests.cs @@ -7,8 +7,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Layouting.Provider; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Authentication; [TestClass] diff --git a/Testing/Acceptance/Modules/Authentication/BearerAuthenticationTests.cs b/Testing/Acceptance/Modules/Authentication/BearerAuthenticationTests.cs index c4bcfab0c..4280357e4 100644 --- a/Testing/Acceptance/Modules/Authentication/BearerAuthenticationTests.cs +++ b/Testing/Acceptance/Modules/Authentication/BearerAuthenticationTests.cs @@ -6,7 +6,6 @@ using GenHTTP.Modules.Authentication; using GenHTTP.Modules.Authentication.Bearer; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Authentication; diff --git a/Testing/Acceptance/Modules/Authentication/ClientCertificateAuthenticationTests.cs b/Testing/Acceptance/Modules/Authentication/ClientCertificateAuthenticationTests.cs index 665719180..8b97c2788 100644 --- a/Testing/Acceptance/Modules/Authentication/ClientCertificateAuthenticationTests.cs +++ b/Testing/Acceptance/Modules/Authentication/ClientCertificateAuthenticationTests.cs @@ -10,8 +10,6 @@ using GenHTTP.Modules.Authentication.ClientCertificate; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Authentication; [TestClass] diff --git a/Testing/Acceptance/Modules/Authentication/MultiAuthenticationTests.cs b/Testing/Acceptance/Modules/Authentication/MultiAuthenticationTests.cs index 68f1eb04a..68557f7dd 100644 --- a/Testing/Acceptance/Modules/Authentication/MultiAuthenticationTests.cs +++ b/Testing/Acceptance/Modules/Authentication/MultiAuthenticationTests.cs @@ -5,7 +5,6 @@ using GenHTTP.Modules.Authentication; using GenHTTP.Modules.Authentication.Multi; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Net; using System.Net.Http.Headers; using System.Text; diff --git a/Testing/Acceptance/Modules/Authentication/RoleTests.cs b/Testing/Acceptance/Modules/Authentication/RoleTests.cs index 8d79c59b7..1effee693 100644 --- a/Testing/Acceptance/Modules/Authentication/RoleTests.cs +++ b/Testing/Acceptance/Modules/Authentication/RoleTests.cs @@ -7,8 +7,6 @@ using GenHTTP.Modules.Authentication; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Authentication; [TestClass] diff --git a/Testing/Acceptance/Modules/Authentication/UserInjectionTests.cs b/Testing/Acceptance/Modules/Authentication/UserInjectionTests.cs index e423e6e4e..b71d059c1 100644 --- a/Testing/Acceptance/Modules/Authentication/UserInjectionTests.cs +++ b/Testing/Acceptance/Modules/Authentication/UserInjectionTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Reflection.Injectors; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Authentication; diff --git a/Testing/Acceptance/Modules/Basics/RedirectTests.cs b/Testing/Acceptance/Modules/Basics/RedirectTests.cs index 2e156249f..0473b653c 100644 --- a/Testing/Acceptance/Modules/Basics/RedirectTests.cs +++ b/Testing/Acceptance/Modules/Basics/RedirectTests.cs @@ -1,7 +1,6 @@ using System.Net; using GenHTTP.Modules.Basics; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Basics; diff --git a/Testing/Acceptance/Modules/Caching/CacheTests.cs b/Testing/Acceptance/Modules/Caching/CacheTests.cs index 7945a94fc..b497fec50 100644 --- a/Testing/Acceptance/Modules/Caching/CacheTests.cs +++ b/Testing/Acceptance/Modules/Caching/CacheTests.cs @@ -1,6 +1,5 @@ using GenHTTP.Api.Content.Caching; using GenHTTP.Modules.Caching; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Caching; @@ -19,7 +18,7 @@ public async Task TestHit() await cache.StoreAsync("k", "v", new CachedEntry("1", now, 42)); - Assert.AreEqual(1, (await cache.GetEntriesAsync("k")).Length); + Assert.HasCount(1, await cache.GetEntriesAsync("k")); var hit = (await cache.GetEntryAsync("k", "v"))!; @@ -34,7 +33,7 @@ public async Task TestMiss() { foreach (var cache in GetCaches()) { - Assert.AreEqual(0, (await cache.GetEntriesAsync("k")).Length); + Assert.IsEmpty(await cache.GetEntriesAsync("k")); Assert.IsNull(await cache.GetEntryAsync("k", "v")); } @@ -60,7 +59,7 @@ public async Task TestRemoval() await cache.StoreAsync("k", "v", null); - Assert.AreEqual(0, (await cache.GetEntriesAsync("k")).Length); + Assert.IsEmpty(await cache.GetEntriesAsync("k")); Assert.IsNull(await cache.GetEntryAsync("k", "v")); } @@ -75,7 +74,7 @@ public async Task TestStreaming() await cache.StoreAsync("k", "v", stream); - Assert.AreEqual(1, (await cache.GetEntriesAsync("k")).Length); + Assert.HasCount(1, await cache.GetEntriesAsync("k")); await using var resultStream = (await cache.GetEntryAsync("k", "v"))!; @@ -95,7 +94,7 @@ public async Task TestStreamingOverwrite() await cache.StoreAsync("k", "v", stream); - Assert.AreEqual(1, (await cache.GetEntriesAsync("k")).Length); + Assert.HasCount(1, await cache.GetEntriesAsync("k")); } } @@ -109,7 +108,7 @@ await cache.StoreDirectAsync("k", "v", s => s.WriteAsync(new byte[] 1 })); - Assert.AreEqual(1, (await cache.GetEntriesAsync("k")).Length); + Assert.HasCount(1, await cache.GetEntriesAsync("k")); await using var resultStream = (await cache.GetEntryAsync("k", "v"))!; @@ -132,7 +131,7 @@ await cache.StoreDirectAsync("k", "v", s => s.WriteAsync(new byte[] 1 })); - Assert.AreEqual(1, (await cache.GetEntriesAsync("k")).Length); + Assert.HasCount(1, await cache.GetEntriesAsync("k")); } } @@ -141,7 +140,7 @@ public async Task TestStreamingMiss() { foreach (var cache in GetCaches()) { - Assert.AreEqual(0, (await cache.GetEntriesAsync("k")).Length); + Assert.IsEmpty(await cache.GetEntriesAsync("k")); Assert.IsNull(await cache.GetEntryAsync("k", "v")); } @@ -152,4 +151,5 @@ private static ICache[] GetCaches() => Cache.Memory().Build(), Cache.TemporaryFiles().Build() ]; + } diff --git a/Testing/Acceptance/Modules/ClientCaching/CacheValidationTests.cs b/Testing/Acceptance/Modules/ClientCaching/CacheValidationTests.cs index 64e3f4f79..2054d4c68 100644 --- a/Testing/Acceptance/Modules/ClientCaching/CacheValidationTests.cs +++ b/Testing/Acceptance/Modules/ClientCaching/CacheValidationTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.IO; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ClientCaching; diff --git a/Testing/Acceptance/Modules/ClientCaching/ChecksumTests.cs b/Testing/Acceptance/Modules/ClientCaching/ChecksumTests.cs index 34520f233..d362cf5a5 100644 --- a/Testing/Acceptance/Modules/ClientCaching/ChecksumTests.cs +++ b/Testing/Acceptance/Modules/ClientCaching/ChecksumTests.cs @@ -1,6 +1,5 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ClientCaching; diff --git a/Testing/Acceptance/Modules/ClientCaching/PolicyTests.cs b/Testing/Acceptance/Modules/ClientCaching/PolicyTests.cs index bc1e23e25..987ab093f 100644 --- a/Testing/Acceptance/Modules/ClientCaching/PolicyTests.cs +++ b/Testing/Acceptance/Modules/ClientCaching/PolicyTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Modules.ClientCaching; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ClientCaching; diff --git a/Testing/Acceptance/Modules/Compression/CompressionTests.cs b/Testing/Acceptance/Modules/Compression/CompressionTests.cs index ada9b47d4..65841e461 100644 --- a/Testing/Acceptance/Modules/Compression/CompressionTests.cs +++ b/Testing/Acceptance/Modules/Compression/CompressionTests.cs @@ -7,7 +7,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Compression; @@ -64,7 +63,7 @@ public async Task TestCompressionDisabled(TestEngine engine) using var response = await runner.GetResponseAsync(); - Assert.IsFalse(response.Content.Headers.ContentEncoding.Count != 0); + Assert.IsEmpty(response.Content.Headers.ContentEncoding); } /// @@ -99,7 +98,7 @@ public async Task TestNoAdditionalCompression(TestEngine engine) using var response = await runner.GetResponseAsync("/uncompressed"); - Assert.IsFalse(response.Content.Headers.ContentEncoding.Count != 0); + Assert.IsEmpty(response.Content.Headers.ContentEncoding); } [TestMethod] @@ -136,8 +135,8 @@ public async Task TestVaryHeaderExtendedAdded(TestEngine engine) using var response = await runner.GetResponseAsync(request); - Assert.IsTrue(response.Headers.Vary.Contains("Host")); - Assert.IsTrue(response.Headers.Vary.Contains("Accept-Encoding")); + Assert.Contains("Host", response.Headers.Vary); + Assert.Contains("Accept-Encoding", response.Headers.Vary); } [TestMethod] diff --git a/Testing/Acceptance/Modules/Compression/ZstdTests.cs b/Testing/Acceptance/Modules/Compression/ZstdTests.cs index 49340d92c..41ae33044 100644 --- a/Testing/Acceptance/Modules/Compression/ZstdTests.cs +++ b/Testing/Acceptance/Modules/Compression/ZstdTests.cs @@ -3,8 +3,6 @@ using GenHTTP.Modules.Compression.Providers; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Compression; [TestClass] diff --git a/Testing/Acceptance/Modules/Controllers/ActionTests.cs b/Testing/Acceptance/Modules/Controllers/ActionTests.cs index 608337aa9..ad90205ed 100644 --- a/Testing/Acceptance/Modules/Controllers/ActionTests.cs +++ b/Testing/Acceptance/Modules/Controllers/ActionTests.cs @@ -5,7 +5,6 @@ using GenHTTP.Modules.Controllers; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Controllers; diff --git a/Testing/Acceptance/Modules/Controllers/DataTests.cs b/Testing/Acceptance/Modules/Controllers/DataTests.cs index e4eccae95..8a4dcc9a4 100644 --- a/Testing/Acceptance/Modules/Controllers/DataTests.cs +++ b/Testing/Acceptance/Modules/Controllers/DataTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Conversion; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Reflection; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Controllers; diff --git a/Testing/Acceptance/Modules/Controllers/IntegrationTests.cs b/Testing/Acceptance/Modules/Controllers/IntegrationTests.cs index 4fdd94627..274a727f8 100644 --- a/Testing/Acceptance/Modules/Controllers/IntegrationTests.cs +++ b/Testing/Acceptance/Modules/Controllers/IntegrationTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Controllers; using GenHTTP.Modules.Layouting; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Controllers; diff --git a/Testing/Acceptance/Modules/Controllers/ResultTypeTests.cs b/Testing/Acceptance/Modules/Controllers/ResultTypeTests.cs index 4c5d4649a..dcab8b8f5 100644 --- a/Testing/Acceptance/Modules/Controllers/ResultTypeTests.cs +++ b/Testing/Acceptance/Modules/Controllers/ResultTypeTests.cs @@ -6,7 +6,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Reflection; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Controllers; diff --git a/Testing/Acceptance/Modules/Controllers/SeoTests.cs b/Testing/Acceptance/Modules/Controllers/SeoTests.cs index f1b91283a..89eb458b9 100644 --- a/Testing/Acceptance/Modules/Controllers/SeoTests.cs +++ b/Testing/Acceptance/Modules/Controllers/SeoTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Controllers; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Controllers; diff --git a/Testing/Acceptance/Modules/Conversion/ConversionTests.cs b/Testing/Acceptance/Modules/Conversion/ConversionTests.cs index 42b68143f..c0b7f039a 100644 --- a/Testing/Acceptance/Modules/Conversion/ConversionTests.cs +++ b/Testing/Acceptance/Modules/Conversion/ConversionTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Conversion.Serializers; using GenHTTP.Modules.Conversion.Serializers.Forms; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Conversion; diff --git a/Testing/Acceptance/Modules/Conversion/ErrorHandlingTests.cs b/Testing/Acceptance/Modules/Conversion/ErrorHandlingTests.cs index b283af45b..4de8231df 100644 --- a/Testing/Acceptance/Modules/Conversion/ErrorHandlingTests.cs +++ b/Testing/Acceptance/Modules/Conversion/ErrorHandlingTests.cs @@ -1,7 +1,6 @@ using System.Net; using System.Net.Http.Headers; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Conversion; diff --git a/Testing/Acceptance/Modules/Conversion/SerializerTests.cs b/Testing/Acceptance/Modules/Conversion/SerializerTests.cs index 9ac5a16be..1463e47fc 100644 --- a/Testing/Acceptance/Modules/Conversion/SerializerTests.cs +++ b/Testing/Acceptance/Modules/Conversion/SerializerTests.cs @@ -4,8 +4,6 @@ using GenHTTP.Modules.Conversion; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Conversion; [TestClass] diff --git a/Testing/Acceptance/Modules/DependencyInjection/BasicTests.cs b/Testing/Acceptance/Modules/DependencyInjection/BasicTests.cs index f4097ff6b..59b50f728 100644 --- a/Testing/Acceptance/Modules/DependencyInjection/BasicTests.cs +++ b/Testing/Acceptance/Modules/DependencyInjection/BasicTests.cs @@ -7,8 +7,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.DependencyInjection; [TestClass] diff --git a/Testing/Acceptance/Modules/DependencyInjection/ControllerTests.cs b/Testing/Acceptance/Modules/DependencyInjection/ControllerTests.cs index c1018f16a..65b3fe9a3 100644 --- a/Testing/Acceptance/Modules/DependencyInjection/ControllerTests.cs +++ b/Testing/Acceptance/Modules/DependencyInjection/ControllerTests.cs @@ -1,8 +1,6 @@ using GenHTTP.Modules.DependencyInjection; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.DependencyInjection; [TestClass] diff --git a/Testing/Acceptance/Modules/DependencyInjection/InfrastructureTests.cs b/Testing/Acceptance/Modules/DependencyInjection/InfrastructureTests.cs index e828fd45e..24ada1579 100644 --- a/Testing/Acceptance/Modules/DependencyInjection/InfrastructureTests.cs +++ b/Testing/Acceptance/Modules/DependencyInjection/InfrastructureTests.cs @@ -5,8 +5,6 @@ using GenHTTP.Modules.DependencyInjection; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.DependencyInjection; [TestClass] diff --git a/Testing/Acceptance/Modules/DependencyInjection/InlineTests.cs b/Testing/Acceptance/Modules/DependencyInjection/InlineTests.cs index fdda6add5..d2713ad65 100644 --- a/Testing/Acceptance/Modules/DependencyInjection/InlineTests.cs +++ b/Testing/Acceptance/Modules/DependencyInjection/InlineTests.cs @@ -1,7 +1,5 @@ using GenHTTP.Modules.DependencyInjection; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.DependencyInjection; [TestClass] diff --git a/Testing/Acceptance/Modules/DependencyInjection/WebserviceTests.cs b/Testing/Acceptance/Modules/DependencyInjection/WebserviceTests.cs index cc8850b20..56140675a 100644 --- a/Testing/Acceptance/Modules/DependencyInjection/WebserviceTests.cs +++ b/Testing/Acceptance/Modules/DependencyInjection/WebserviceTests.cs @@ -4,8 +4,6 @@ using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.DependencyInjection; [TestClass] diff --git a/Testing/Acceptance/Modules/DirectoryBrowsing/FormatterTest.cs b/Testing/Acceptance/Modules/DirectoryBrowsing/FormatterTest.cs index c997825a7..b659b9092 100644 --- a/Testing/Acceptance/Modules/DirectoryBrowsing/FormatterTest.cs +++ b/Testing/Acceptance/Modules/DirectoryBrowsing/FormatterTest.cs @@ -1,5 +1,4 @@ using GenHTTP.Modules.DirectoryBrowsing.Provider; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.DirectoryBrowsing; diff --git a/Testing/Acceptance/Modules/DirectoryBrowsing/ListingTests.cs b/Testing/Acceptance/Modules/DirectoryBrowsing/ListingTests.cs index c6840b91e..912b0749e 100644 --- a/Testing/Acceptance/Modules/DirectoryBrowsing/ListingTests.cs +++ b/Testing/Acceptance/Modules/DirectoryBrowsing/ListingTests.cs @@ -4,8 +4,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.DirectoryBrowsing; [TestClass] diff --git a/Testing/Acceptance/Modules/ErrorHandling/CustomErrorMapperTests.cs b/Testing/Acceptance/Modules/ErrorHandling/CustomErrorMapperTests.cs index a26fb2131..b2baeb9a2 100644 --- a/Testing/Acceptance/Modules/ErrorHandling/CustomErrorMapperTests.cs +++ b/Testing/Acceptance/Modules/ErrorHandling/CustomErrorMapperTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ErrorHandling; diff --git a/Testing/Acceptance/Modules/ErrorHandling/ErrorHandlingTest.cs b/Testing/Acceptance/Modules/ErrorHandling/ErrorHandlingTest.cs index c9f743a06..5046c60c4 100644 --- a/Testing/Acceptance/Modules/ErrorHandling/ErrorHandlingTest.cs +++ b/Testing/Acceptance/Modules/ErrorHandling/ErrorHandlingTest.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ErrorHandling; diff --git a/Testing/Acceptance/Modules/ErrorHandling/HtmlErrorMapperTest.cs b/Testing/Acceptance/Modules/ErrorHandling/HtmlErrorMapperTest.cs index e01127343..06e32cc0f 100644 --- a/Testing/Acceptance/Modules/ErrorHandling/HtmlErrorMapperTest.cs +++ b/Testing/Acceptance/Modules/ErrorHandling/HtmlErrorMapperTest.cs @@ -3,7 +3,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.ErrorHandling; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ErrorHandling; diff --git a/Testing/Acceptance/Modules/ErrorHandling/StructuredErrorMapperTests.cs b/Testing/Acceptance/Modules/ErrorHandling/StructuredErrorMapperTests.cs index 554763bf4..6c3cf277b 100644 --- a/Testing/Acceptance/Modules/ErrorHandling/StructuredErrorMapperTests.cs +++ b/Testing/Acceptance/Modules/ErrorHandling/StructuredErrorMapperTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.ErrorHandling; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ErrorHandling; diff --git a/Testing/Acceptance/Modules/Functional/InlineTests.cs b/Testing/Acceptance/Modules/Functional/InlineTests.cs index 90040bb07..e01917747 100644 --- a/Testing/Acceptance/Modules/Functional/InlineTests.cs +++ b/Testing/Acceptance/Modules/Functional/InlineTests.cs @@ -5,7 +5,6 @@ using GenHTTP.Modules.Basics; using GenHTTP.Modules.Functional; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Functional; diff --git a/Testing/Acceptance/Modules/Functional/IntegrationTest.cs b/Testing/Acceptance/Modules/Functional/IntegrationTest.cs index 1b87c1ae1..ef137bcc8 100644 --- a/Testing/Acceptance/Modules/Functional/IntegrationTest.cs +++ b/Testing/Acceptance/Modules/Functional/IntegrationTest.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.Conversion; using GenHTTP.Modules.Conversion.Formatters; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Functional; diff --git a/Testing/Acceptance/Modules/Functional/MethodTest.cs b/Testing/Acceptance/Modules/Functional/MethodTest.cs index 847e5bff2..036d801d8 100644 --- a/Testing/Acceptance/Modules/Functional/MethodTest.cs +++ b/Testing/Acceptance/Modules/Functional/MethodTest.cs @@ -1,7 +1,6 @@ using System.Net; using System.Net.Http.Headers; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Functional; diff --git a/Testing/Acceptance/Modules/I18n/ContentLanguageTests.cs b/Testing/Acceptance/Modules/I18n/ContentLanguageTests.cs index 67c212496..4bc5a7614 100644 --- a/Testing/Acceptance/Modules/I18n/ContentLanguageTests.cs +++ b/Testing/Acceptance/Modules/I18n/ContentLanguageTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.I18n; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.I18n; diff --git a/Testing/Acceptance/Modules/I18n/LanguageParserTests.cs b/Testing/Acceptance/Modules/I18n/LanguageParserTests.cs index a6dc0ca11..aa46db4dd 100644 --- a/Testing/Acceptance/Modules/I18n/LanguageParserTests.cs +++ b/Testing/Acceptance/Modules/I18n/LanguageParserTests.cs @@ -1,9 +1,4 @@ -using GenHTTP.Api.Protocol; -using GenHTTP.Modules.Functional; -using GenHTTP.Modules.I18n; -using GenHTTP.Modules.I18n.Parsers; -using GenHTTP.Modules.I18n.Provider; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using GenHTTP.Modules.I18n.Parsers; using System.Globalization; namespace GenHTTP.Testing.Acceptance.Modules.I18n; diff --git a/Testing/Acceptance/Modules/I18n/LocalizationTests.cs b/Testing/Acceptance/Modules/I18n/LocalizationTests.cs index b670bfa5c..2f915a28a 100644 --- a/Testing/Acceptance/Modules/I18n/LocalizationTests.cs +++ b/Testing/Acceptance/Modules/I18n/LocalizationTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.I18n; using GenHTTP.Modules.I18n.Provider; -using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Globalization; namespace GenHTTP.Testing.Acceptance.Modules.I18n; diff --git a/Testing/Acceptance/Modules/IO/ChangeTrackingTests.cs b/Testing/Acceptance/Modules/IO/ChangeTrackingTests.cs index 921857c62..53e7bf28a 100644 --- a/Testing/Acceptance/Modules/IO/ChangeTrackingTests.cs +++ b/Testing/Acceptance/Modules/IO/ChangeTrackingTests.cs @@ -1,6 +1,5 @@ using GenHTTP.Modules.IO; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/ContentTests.cs b/Testing/Acceptance/Modules/IO/ContentTests.cs index 4d9f985fe..ef0f22e35 100644 --- a/Testing/Acceptance/Modules/IO/ContentTests.cs +++ b/Testing/Acceptance/Modules/IO/ContentTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/DownloadTests.cs b/Testing/Acceptance/Modules/IO/DownloadTests.cs index 513859a1b..ae33c8a0d 100644 --- a/Testing/Acceptance/Modules/IO/DownloadTests.cs +++ b/Testing/Acceptance/Modules/IO/DownloadTests.cs @@ -2,7 +2,6 @@ using System.Text; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/RangeTests.cs b/Testing/Acceptance/Modules/IO/RangeTests.cs index 55c19f748..2da910102 100644 --- a/Testing/Acceptance/Modules/IO/RangeTests.cs +++ b/Testing/Acceptance/Modules/IO/RangeTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/RangedStreamTests.cs b/Testing/Acceptance/Modules/IO/RangedStreamTests.cs index f956cdbed..4b761c3f2 100644 --- a/Testing/Acceptance/Modules/IO/RangedStreamTests.cs +++ b/Testing/Acceptance/Modules/IO/RangedStreamTests.cs @@ -1,6 +1,5 @@ using System.Text; using GenHTTP.Modules.IO.Ranges; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/ResourceTest.cs b/Testing/Acceptance/Modules/IO/ResourceTest.cs index 32a58276b..ad2ca66e3 100644 --- a/Testing/Acceptance/Modules/IO/ResourceTest.cs +++ b/Testing/Acceptance/Modules/IO/ResourceTest.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/ResourceTreeTests.cs b/Testing/Acceptance/Modules/IO/ResourceTreeTests.cs index 524aac838..7f015b7f4 100644 --- a/Testing/Acceptance/Modules/IO/ResourceTreeTests.cs +++ b/Testing/Acceptance/Modules/IO/ResourceTreeTests.cs @@ -2,8 +2,6 @@ using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.IO; [TestClass] @@ -19,9 +17,9 @@ public async Task TestAssemblyByName() Assert.IsNotNull(await tree.TryGetResourceAsync("File.txt")); - Assert.AreEqual(1, (await tree.GetNodes()).Count); + Assert.HasCount(1, await tree.GetNodes()); - Assert.AreEqual(5, (await tree.GetResources()).Count); + Assert.HasCount(5, await tree.GetResources()); } [TestMethod] @@ -29,7 +27,7 @@ public async Task TestByAssembly() { var tree = ResourceTree.FromAssembly(Assembly.GetExecutingAssembly()).Build(); - Assert.AreEqual(1, (await tree.GetNodes()).Count); + Assert.HasCount(1, await tree.GetNodes()); } } diff --git a/Testing/Acceptance/Modules/IO/ResourcesTests.cs b/Testing/Acceptance/Modules/IO/ResourcesTests.cs index f6b4b239a..d5f93b956 100644 --- a/Testing/Acceptance/Modules/IO/ResourcesTests.cs +++ b/Testing/Acceptance/Modules/IO/ResourcesTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; diff --git a/Testing/Acceptance/Modules/IO/VirtualTreeTests.cs b/Testing/Acceptance/Modules/IO/VirtualTreeTests.cs index c41374802..768310a07 100644 --- a/Testing/Acceptance/Modules/IO/VirtualTreeTests.cs +++ b/Testing/Acceptance/Modules/IO/VirtualTreeTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Api.Routing; using GenHTTP.Modules.DirectoryBrowsing; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.IO; @@ -25,7 +24,7 @@ public async Task TestNestedTree() Assert.IsNotNull(node); Assert.IsNotNull(file); - Assert.IsTrue((node as IResourceNode)?.Parent == virt); + Assert.AreEqual(virt, (node as IResourceNode)?.Parent); Assert.IsNotNull(virt.Modified); } diff --git a/Testing/Acceptance/Modules/Inspection/InspectionTests.cs b/Testing/Acceptance/Modules/Inspection/InspectionTests.cs index 61414e3e5..5d067ab9f 100644 --- a/Testing/Acceptance/Modules/Inspection/InspectionTests.cs +++ b/Testing/Acceptance/Modules/Inspection/InspectionTests.cs @@ -4,8 +4,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Inspection; [TestClass] diff --git a/Testing/Acceptance/Modules/Inspection/SerializationTests.cs b/Testing/Acceptance/Modules/Inspection/SerializationTests.cs index 8479fb564..ffd30e9bd 100644 --- a/Testing/Acceptance/Modules/Inspection/SerializationTests.cs +++ b/Testing/Acceptance/Modules/Inspection/SerializationTests.cs @@ -7,8 +7,6 @@ using GenHTTP.Modules.Inspection; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Inspection; [TestClass] diff --git a/Testing/Acceptance/Modules/Layouting/HandlerTests.cs b/Testing/Acceptance/Modules/Layouting/HandlerTests.cs index 34cf45cbb..b4b0e2601 100644 --- a/Testing/Acceptance/Modules/Layouting/HandlerTests.cs +++ b/Testing/Acceptance/Modules/Layouting/HandlerTests.cs @@ -3,8 +3,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Layouting; [TestClass] diff --git a/Testing/Acceptance/Modules/Layouting/LayoutTests.cs b/Testing/Acceptance/Modules/Layouting/LayoutTests.cs index f46563496..8da44a64a 100644 --- a/Testing/Acceptance/Modules/Layouting/LayoutTests.cs +++ b/Testing/Acceptance/Modules/Layouting/LayoutTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.Authentication; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Layouting; diff --git a/Testing/Acceptance/Modules/Layouting/MultiSegmentTests.cs b/Testing/Acceptance/Modules/Layouting/MultiSegmentTests.cs index e270a8d92..b04f4ff84 100644 --- a/Testing/Acceptance/Modules/Layouting/MultiSegmentTests.cs +++ b/Testing/Acceptance/Modules/Layouting/MultiSegmentTests.cs @@ -4,8 +4,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Layouting; [TestClass] diff --git a/Testing/Acceptance/Modules/Layouting/RoutingTests.cs b/Testing/Acceptance/Modules/Layouting/RoutingTests.cs index 2fdf9ef32..9bf6ac4b0 100644 --- a/Testing/Acceptance/Modules/Layouting/RoutingTests.cs +++ b/Testing/Acceptance/Modules/Layouting/RoutingTests.cs @@ -1,6 +1,5 @@ using System.Net; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Layouting; diff --git a/Testing/Acceptance/Modules/Layouting/SegmentTests.cs b/Testing/Acceptance/Modules/Layouting/SegmentTests.cs index 43cb416a4..3cb271ea7 100644 --- a/Testing/Acceptance/Modules/Layouting/SegmentTests.cs +++ b/Testing/Acceptance/Modules/Layouting/SegmentTests.cs @@ -1,7 +1,6 @@ using System.Net; using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Layouting; diff --git a/Testing/Acceptance/Modules/LoadBalancing/LoadBalancerTests.cs b/Testing/Acceptance/Modules/LoadBalancing/LoadBalancerTests.cs index 2e3d89ced..5686bc3cb 100644 --- a/Testing/Acceptance/Modules/LoadBalancing/LoadBalancerTests.cs +++ b/Testing/Acceptance/Modules/LoadBalancing/LoadBalancerTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Infrastructure; using GenHTTP.Modules.IO; using GenHTTP.Modules.LoadBalancing; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.LoadBalancing; diff --git a/Testing/Acceptance/Modules/OpenApi/ArgumentTests.cs b/Testing/Acceptance/Modules/OpenApi/ArgumentTests.cs index cd1e0847a..219bb875f 100644 --- a/Testing/Acceptance/Modules/OpenApi/ArgumentTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/ArgumentTests.cs @@ -6,8 +6,6 @@ using Microsoft.OpenApi; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; [TestClass] diff --git a/Testing/Acceptance/Modules/OpenApi/DiscoveryTests.cs b/Testing/Acceptance/Modules/OpenApi/DiscoveryTests.cs index 8143a9b59..27bd9ed03 100644 --- a/Testing/Acceptance/Modules/OpenApi/DiscoveryTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/DiscoveryTests.cs @@ -5,9 +5,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.OpenApi; using GenHTTP.Modules.OpenApi.Discovery; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - using OpenApiDocument = NSwag.OpenApiDocument; namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; diff --git a/Testing/Acceptance/Modules/OpenApi/FormatTests.cs b/Testing/Acceptance/Modules/OpenApi/FormatTests.cs index 28c74d6a9..8ac0f7ff7 100644 --- a/Testing/Acceptance/Modules/OpenApi/FormatTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/FormatTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.Functional.Provider; using GenHTTP.Modules.OpenApi; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; diff --git a/Testing/Acceptance/Modules/OpenApi/InfrastructureTests.cs b/Testing/Acceptance/Modules/OpenApi/InfrastructureTests.cs index a3eebce49..8e4ebc547 100644 --- a/Testing/Acceptance/Modules/OpenApi/InfrastructureTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/InfrastructureTests.cs @@ -1,7 +1,6 @@ using System.Net; using GenHTTP.Modules.Functional; using GenHTTP.Modules.OpenApi; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; diff --git a/Testing/Acceptance/Modules/OpenApi/IntegrationTests.cs b/Testing/Acceptance/Modules/OpenApi/IntegrationTests.cs index be4c3ff56..ff22204b8 100644 --- a/Testing/Acceptance/Modules/OpenApi/IntegrationTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/IntegrationTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.OpenApi; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; diff --git a/Testing/Acceptance/Modules/OpenApi/MetaDataTests.cs b/Testing/Acceptance/Modules/OpenApi/MetaDataTests.cs index 16dc646f0..85281aa04 100644 --- a/Testing/Acceptance/Modules/OpenApi/MetaDataTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/MetaDataTests.cs @@ -3,8 +3,6 @@ using GenHTTP.Modules.OpenApi; using GenHTTP.Modules.OpenApi.Handler; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; [TestClass] diff --git a/Testing/Acceptance/Modules/OpenApi/ResponseTests.cs b/Testing/Acceptance/Modules/OpenApi/ResponseTests.cs index 9da43c08b..a04d9c138 100644 --- a/Testing/Acceptance/Modules/OpenApi/ResponseTests.cs +++ b/Testing/Acceptance/Modules/OpenApi/ResponseTests.cs @@ -4,8 +4,6 @@ using GenHTTP.Modules.Basics; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.OpenApi; [TestClass] diff --git a/Testing/Acceptance/Modules/Protobuf/ProtobufTests.cs b/Testing/Acceptance/Modules/Protobuf/ProtobufTests.cs index 835f411ea..cca92f301 100644 --- a/Testing/Acceptance/Modules/Protobuf/ProtobufTests.cs +++ b/Testing/Acceptance/Modules/Protobuf/ProtobufTests.cs @@ -5,7 +5,6 @@ using GenHTTP.Modules.Protobuf; using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; using ProtoBuf; namespace GenHTTP.Testing.Acceptance.Modules.Protobuf; diff --git a/Testing/Acceptance/Modules/Reflection/ContentTests.cs b/Testing/Acceptance/Modules/Reflection/ContentTests.cs index 710a59fba..57d90be8a 100644 --- a/Testing/Acceptance/Modules/Reflection/ContentTests.cs +++ b/Testing/Acceptance/Modules/Reflection/ContentTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; using GenHTTP.Modules.Reflection; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Reflection; diff --git a/Testing/Acceptance/Modules/Reflection/ErrorHandlingTests.cs b/Testing/Acceptance/Modules/Reflection/ErrorHandlingTests.cs index 3b249f93c..07645285c 100644 --- a/Testing/Acceptance/Modules/Reflection/ErrorHandlingTests.cs +++ b/Testing/Acceptance/Modules/Reflection/ErrorHandlingTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Conversion; using GenHTTP.Modules.Functional; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Reflection; diff --git a/Testing/Acceptance/Modules/Reflection/InterceptionTests.cs b/Testing/Acceptance/Modules/Reflection/InterceptionTests.cs index bb82ebc4c..ddd1b5491 100644 --- a/Testing/Acceptance/Modules/Reflection/InterceptionTests.cs +++ b/Testing/Acceptance/Modules/Reflection/InterceptionTests.cs @@ -6,8 +6,6 @@ using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Reflection.Operations; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Reflection; [TestClass] diff --git a/Testing/Acceptance/Modules/Reflection/ParameterTests.cs b/Testing/Acceptance/Modules/Reflection/ParameterTests.cs index b5deeff13..c0e395a56 100644 --- a/Testing/Acceptance/Modules/Reflection/ParameterTests.cs +++ b/Testing/Acceptance/Modules/Reflection/ParameterTests.cs @@ -1,7 +1,6 @@ using System.Net; using GenHTTP.Modules.Functional; using GenHTTP.Modules.Reflection; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Reflection; diff --git a/Testing/Acceptance/Modules/Reflection/ResultTests.cs b/Testing/Acceptance/Modules/Reflection/ResultTests.cs index 390c14e18..db12cd398 100644 --- a/Testing/Acceptance/Modules/Reflection/ResultTests.cs +++ b/Testing/Acceptance/Modules/Reflection/ResultTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Api.Protocol; using GenHTTP.Modules.Functional; using GenHTTP.Modules.Reflection; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Cookie = GenHTTP.Api.Protocol.Cookie; namespace GenHTTP.Testing.Acceptance.Modules.Reflection; diff --git a/Testing/Acceptance/Modules/Reflection/WildcardTests.cs b/Testing/Acceptance/Modules/Reflection/WildcardTests.cs index f99ada79b..7b2ba1319 100644 --- a/Testing/Acceptance/Modules/Reflection/WildcardTests.cs +++ b/Testing/Acceptance/Modules/Reflection/WildcardTests.cs @@ -3,8 +3,6 @@ using GenHTTP.Modules.Functional; using GenHTTP.Modules.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.Reflection; [TestClass] @@ -22,7 +20,7 @@ public async Task TestRouting(TestEngine engine) var app = Inline.Create() .Get("/tenant/:tenantID/", (int tenantID) => { - Assert.IsTrue(tenantID > 0); + Assert.IsGreaterThan(0, tenantID); return resources; }); diff --git a/Testing/Acceptance/Modules/ReverseProxy/ReverseProxyTests.cs b/Testing/Acceptance/Modules/ReverseProxy/ReverseProxyTests.cs index d0f9146cd..8ff4c7e4e 100644 --- a/Testing/Acceptance/Modules/ReverseProxy/ReverseProxyTests.cs +++ b/Testing/Acceptance/Modules/ReverseProxy/ReverseProxyTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.ReverseProxy; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Cookie = GenHTTP.Api.Protocol.Cookie; namespace GenHTTP.Testing.Acceptance.Modules.ReverseProxy; @@ -391,7 +390,7 @@ public ProxiedProvider(Func response) public ValueTask HandleAsync(IRequest request) { Assert.AreNotEqual(request.Client, request.LocalClient); - Assert.IsTrue(request.Forwardings.Count > 0); + Assert.IsNotEmpty(request.Forwardings); var response = _Response.Invoke(request); diff --git a/Testing/Acceptance/Modules/Security/CorsTests.cs b/Testing/Acceptance/Modules/Security/CorsTests.cs index 4214da922..354068e77 100644 --- a/Testing/Acceptance/Modules/Security/CorsTests.cs +++ b/Testing/Acceptance/Modules/Security/CorsTests.cs @@ -4,7 +4,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Security; using GenHTTP.Modules.Security.Cors; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Security; diff --git a/Testing/Acceptance/Modules/Security/ExtensionTests.cs b/Testing/Acceptance/Modules/Security/ExtensionTests.cs index f25721828..303441693 100644 --- a/Testing/Acceptance/Modules/Security/ExtensionTests.cs +++ b/Testing/Acceptance/Modules/Security/ExtensionTests.cs @@ -1,7 +1,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Security; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Security; diff --git a/Testing/Acceptance/Modules/ServerCaching/PrecompressedContentTest.cs b/Testing/Acceptance/Modules/ServerCaching/PrecompressedContentTest.cs index b045a2a22..be00efb2d 100644 --- a/Testing/Acceptance/Modules/ServerCaching/PrecompressedContentTest.cs +++ b/Testing/Acceptance/Modules/ServerCaching/PrecompressedContentTest.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Compression; using GenHTTP.Modules.IO; using GenHTTP.Modules.ServerCaching; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ServerCaching; diff --git a/Testing/Acceptance/Modules/ServerCaching/ServerCacheTests.cs b/Testing/Acceptance/Modules/ServerCaching/ServerCacheTests.cs index 5ec4e4943..060fc1ee7 100644 --- a/Testing/Acceptance/Modules/ServerCaching/ServerCacheTests.cs +++ b/Testing/Acceptance/Modules/ServerCaching/ServerCacheTests.cs @@ -6,8 +6,6 @@ using GenHTTP.Modules.ServerCaching; using GenHTTP.Modules.ServerCaching.Provider; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.IdentityModel.Tokens; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Cookie = GenHTTP.Api.Protocol.Cookie; namespace GenHTTP.Testing.Acceptance.Modules.ServerCaching; @@ -163,7 +161,7 @@ public async Task TestHeadersPreserved(TestEngine engine) Assert.AreEqual("some-encoding", cached.GetContentHeader("Content-Encoding")); Assert.AreEqual(now.ToString(), cached.Content.Headers.LastModified.GetValueOrDefault().UtcDateTime.ToString()); - Assert.IsTrue(cached.GetContentHeader("Expires") != null); + Assert.IsNotNull(cached.GetContentHeader("Expires")); Assert.AreEqual("0123456789", await cached.GetContentAsync()); } diff --git a/Testing/Acceptance/Modules/ServerSentEvents/DataTests.cs b/Testing/Acceptance/Modules/ServerSentEvents/DataTests.cs index f260cb65b..e1ca9136d 100644 --- a/Testing/Acceptance/Modules/ServerSentEvents/DataTests.cs +++ b/Testing/Acceptance/Modules/ServerSentEvents/DataTests.cs @@ -2,8 +2,6 @@ using GenHTTP.Modules.ServerSentEvents; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.ServerSentEvents; [TestClass] diff --git a/Testing/Acceptance/Modules/ServerSentEvents/IntegrationTests.cs b/Testing/Acceptance/Modules/ServerSentEvents/IntegrationTests.cs index 317b96773..54e88d5e5 100644 --- a/Testing/Acceptance/Modules/ServerSentEvents/IntegrationTests.cs +++ b/Testing/Acceptance/Modules/ServerSentEvents/IntegrationTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.Conversion; using GenHTTP.Modules.ServerSentEvents; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.ServerSentEvents; diff --git a/Testing/Acceptance/Modules/ServerSentEvents/ProtocolTests.cs b/Testing/Acceptance/Modules/ServerSentEvents/ProtocolTests.cs index 1d8b90b30..00551f8a7 100644 --- a/Testing/Acceptance/Modules/ServerSentEvents/ProtocolTests.cs +++ b/Testing/Acceptance/Modules/ServerSentEvents/ProtocolTests.cs @@ -2,8 +2,6 @@ using GenHTTP.Modules.ServerSentEvents; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Modules.ServerSentEvents; [TestClass] diff --git a/Testing/Acceptance/Modules/SinglePageApplications/SinglePageTests.cs b/Testing/Acceptance/Modules/SinglePageApplications/SinglePageTests.cs index 76646dbca..6d19aee94 100644 --- a/Testing/Acceptance/Modules/SinglePageApplications/SinglePageTests.cs +++ b/Testing/Acceptance/Modules/SinglePageApplications/SinglePageTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.SinglePageApplications; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.SinglePageApplications; diff --git a/Testing/Acceptance/Modules/StaticWebsites/StaticWebsiteTests.cs b/Testing/Acceptance/Modules/StaticWebsites/StaticWebsiteTests.cs index 986faaa8a..6186c2079 100644 --- a/Testing/Acceptance/Modules/StaticWebsites/StaticWebsiteTests.cs +++ b/Testing/Acceptance/Modules/StaticWebsites/StaticWebsiteTests.cs @@ -2,7 +2,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.StaticWebsites; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.StaticWebsites; diff --git a/Testing/Acceptance/Modules/VirtualHosting/VirtualHostsTests.cs b/Testing/Acceptance/Modules/VirtualHosting/VirtualHostsTests.cs index 8af7542d8..41d69d075 100644 --- a/Testing/Acceptance/Modules/VirtualHosting/VirtualHostsTests.cs +++ b/Testing/Acceptance/Modules/VirtualHosting/VirtualHostsTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.VirtualHosting; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.VirtualHosting; diff --git a/Testing/Acceptance/Modules/Webservices/AmbiguityTests.cs b/Testing/Acceptance/Modules/Webservices/AmbiguityTests.cs index dbedfc378..f291f8d76 100644 --- a/Testing/Acceptance/Modules/Webservices/AmbiguityTests.cs +++ b/Testing/Acceptance/Modules/Webservices/AmbiguityTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.IO; using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Webservices; diff --git a/Testing/Acceptance/Modules/Webservices/ExtensionTests.cs b/Testing/Acceptance/Modules/Webservices/ExtensionTests.cs index eb6d42bd6..69150602b 100644 --- a/Testing/Acceptance/Modules/Webservices/ExtensionTests.cs +++ b/Testing/Acceptance/Modules/Webservices/ExtensionTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Webservices; diff --git a/Testing/Acceptance/Modules/Webservices/HandlerResultTests.cs b/Testing/Acceptance/Modules/Webservices/HandlerResultTests.cs index 029869378..cf4c9680d 100644 --- a/Testing/Acceptance/Modules/Webservices/HandlerResultTests.cs +++ b/Testing/Acceptance/Modules/Webservices/HandlerResultTests.cs @@ -6,7 +6,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.StaticWebsites; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Webservices; diff --git a/Testing/Acceptance/Modules/Webservices/ResultTypeTests.cs b/Testing/Acceptance/Modules/Webservices/ResultTypeTests.cs index 647f67915..1be89fda7 100644 --- a/Testing/Acceptance/Modules/Webservices/ResultTypeTests.cs +++ b/Testing/Acceptance/Modules/Webservices/ResultTypeTests.cs @@ -3,7 +3,6 @@ using GenHTTP.Modules.Layouting; using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Webservices; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GenHTTP.Testing.Acceptance.Modules.Webservices; diff --git a/Testing/Acceptance/Modules/Webservices/WebserviceTests.cs b/Testing/Acceptance/Modules/Webservices/WebserviceTests.cs index 6c3d87c4d..b045df3aa 100644 --- a/Testing/Acceptance/Modules/Webservices/WebserviceTests.cs +++ b/Testing/Acceptance/Modules/Webservices/WebserviceTests.cs @@ -11,7 +11,6 @@ using GenHTTP.Modules.Reflection; using GenHTTP.Modules.Webservices; using GenHTTP.Testing.Acceptance.Utilities; -using Microsoft.VisualStudio.TestTools.UnitTesting; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; diff --git a/Testing/Acceptance/Modules/Websockets/IntegrationTest.cs b/Testing/Acceptance/Modules/Websockets/IntegrationTest.cs index c3bdf5977..42ab84253 100644 --- a/Testing/Acceptance/Modules/Websockets/IntegrationTest.cs +++ b/Testing/Acceptance/Modules/Websockets/IntegrationTest.cs @@ -63,7 +63,7 @@ public async Task TestDataTypes() Assert.IsTrue(socket.IsAvailable); - Assert.IsTrue(socket.Request.Headers.Count > 0); + Assert.IsNotEmpty(socket.Request.Headers); socket.Close(42); diff --git a/Testing/Acceptance/MultiEngineTest.cs b/Testing/Acceptance/MultiEngineTest.cs index 449dc010f..8d0568496 100644 --- a/Testing/Acceptance/MultiEngineTest.cs +++ b/Testing/Acceptance/MultiEngineTest.cs @@ -1,7 +1,5 @@ using System.Reflection; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance; /// diff --git a/Testing/Acceptance/Utilities/Chain.cs b/Testing/Acceptance/Utilities/Chain.cs index cc6d544af..36ecd52c6 100644 --- a/Testing/Acceptance/Utilities/Chain.cs +++ b/Testing/Acceptance/Utilities/Chain.cs @@ -3,8 +3,6 @@ using GenHTTP.Modules.ErrorHandling; using GenHTTP.Modules.ErrorHandling.Provider; -using Microsoft.VisualStudio.TestTools.UnitTesting; - namespace GenHTTP.Testing.Acceptance.Utilities; internal static class Chain