From f9a9bdec5a2aad015c0f3982fbbc0a240a5caee6 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Thu, 22 Sep 2016 17:11:46 -0700 Subject: [PATCH 01/11] Added HTTP method constants --- src/Microsoft.AspNetCore.Http/HttpMethods.cs | 17 +++++++++++++++++ .../OwinFeatureCollectionTests.cs | 5 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 src/Microsoft.AspNetCore.Http/HttpMethods.cs diff --git a/src/Microsoft.AspNetCore.Http/HttpMethods.cs b/src/Microsoft.AspNetCore.Http/HttpMethods.cs new file mode 100644 index 00000000..b08be7f5 --- /dev/null +++ b/src/Microsoft.AspNetCore.Http/HttpMethods.cs @@ -0,0 +1,17 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Http +{ + public static class HttpMethods + { + public const string Connect = "CONNECT"; + public const string Delete = "DELETE"; + public const string Get = "GET"; + public const string Options = "OPTIONS"; + public const string Patch = "PATCH"; + public const string Post = "POST"; + public const string Put = "PUT"; + public const string Trace = "TRACE"; + } +} diff --git a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs index 42033373..e029ebe8 100644 --- a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs +++ b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Http.Features; using Xunit; +using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Owin { @@ -25,7 +26,7 @@ public void OwinHttpEnvironmentCanBeCreated() { var env = new Dictionary { - { "owin.RequestMethod", "POST" }, + { "owin.RequestMethod", HttpMethods.Post }, { "owin.RequestPath", "/path" }, { "owin.RequestPathBase", "/pathBase" }, { "owin.RequestQueryString", "name=value" }, @@ -33,7 +34,7 @@ public void OwinHttpEnvironmentCanBeCreated() var features = new OwinFeatureCollection(env); var requestFeature = Get(features); - Assert.Equal(requestFeature.Method, "POST"); + Assert.Equal(requestFeature.Method, HttpMethods.Post); Assert.Equal(requestFeature.Path, "/path"); Assert.Equal(requestFeature.PathBase, "/pathBase"); Assert.Equal(requestFeature.QueryString, "?name=value"); From b79adf14f6f35ffd84e85c196573bb5b7e679498 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Fri, 23 Sep 2016 10:35:10 -0700 Subject: [PATCH 02/11] Moved HttpMethods to HttpAbstractions and added an equals method --- .../HttpMethods.cs | 7 +++++++ 1 file changed, 7 insertions(+) rename src/{Microsoft.AspNetCore.Http => Microsoft.AspNetCore.Http.Abstractions}/HttpMethods.cs (75%) diff --git a/src/Microsoft.AspNetCore.Http/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs similarity index 75% rename from src/Microsoft.AspNetCore.Http/HttpMethods.cs rename to src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index b08be7f5..376f4408 100644 --- a/src/Microsoft.AspNetCore.Http/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; + namespace Microsoft.AspNetCore.Http { public static class HttpMethods @@ -13,5 +15,10 @@ public static class HttpMethods public const string Post = "POST"; public const string Put = "PUT"; public const string Trace = "TRACE"; + + public static bool Equals(string firstMethod, string secondMethod) + { + return StringComparer.OrdinalIgnoreCase.Equals(firstMethod, secondMethod); + } } } From 3426646537eb94fa1f9b473b7dd932176e53a02a Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Fri, 23 Sep 2016 14:20:03 -0700 Subject: [PATCH 03/11] Made equality check methods for each Http method --- .../HttpMethods.cs | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index 376f4408..2c6efebd 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -16,9 +16,44 @@ public static class HttpMethods public const string Put = "PUT"; public const string Trace = "TRACE"; - public static bool Equals(string firstMethod, string secondMethod) + public static bool IsConnectMethod(string inputMethod) { - return StringComparer.OrdinalIgnoreCase.Equals(firstMethod, secondMethod); + return object.ReferenceEquals(Connect ,inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Connect, inputMethod); + } + + public static bool IsDeleteMethod(string inputMethod) + { + return object.ReferenceEquals(Delete, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Delete, inputMethod); + } + + public static bool IsGetMethod(string inputMethod) + { + return object.ReferenceEquals(Get, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Get, inputMethod); + } + + public static bool IsOptionsMethod(string inputMethod) + { + return object.ReferenceEquals(Options, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Options, inputMethod); + } + + public static bool IsPatchMethod(string inputMethod) + { + return object.ReferenceEquals(Patch, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Patch, inputMethod); + } + + public static bool IsPostMethod(string inputMethod) + { + return object.ReferenceEquals(Post, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Post, inputMethod); + } + + public static bool IsPutMethod(string inputMethod) + { + return object.ReferenceEquals(Put, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Put, inputMethod); + } + + public static bool IsTraceMethod(string inputMethod) + { + return object.ReferenceEquals(Trace, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Trace, inputMethod); } } } From 8a3a4e0f417f3b55578b6a9058f895bed3231a58 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Fri, 23 Sep 2016 15:37:06 -0700 Subject: [PATCH 04/11] Responding to PR comments --- .../HttpMethods.cs | 32 +++++++++---------- .../OwinFeatureCollectionTests.cs | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index 2c6efebd..5ef6be94 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -16,44 +16,44 @@ public static class HttpMethods public const string Put = "PUT"; public const string Trace = "TRACE"; - public static bool IsConnectMethod(string inputMethod) + public static bool IsConnectMethod(string method) { - return object.ReferenceEquals(Connect ,inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Connect, inputMethod); + return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); } - public static bool IsDeleteMethod(string inputMethod) + public static bool IsDeleteMethod(string method) { - return object.ReferenceEquals(Delete, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Delete, inputMethod); + return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); } - public static bool IsGetMethod(string inputMethod) + public static bool IsGetMethod(string method) { - return object.ReferenceEquals(Get, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Get, inputMethod); + return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); } - public static bool IsOptionsMethod(string inputMethod) + public static bool IsOptionsMethod(string method) { - return object.ReferenceEquals(Options, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Options, inputMethod); + return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); } - public static bool IsPatchMethod(string inputMethod) + public static bool IsPatchMethod(string method) { - return object.ReferenceEquals(Patch, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Patch, inputMethod); + return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); } - public static bool IsPostMethod(string inputMethod) + public static bool IsPostMethod(string method) { - return object.ReferenceEquals(Post, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Post, inputMethod); + return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); } - public static bool IsPutMethod(string inputMethod) + public static bool IsPutMethod(string method) { - return object.ReferenceEquals(Put, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Put, inputMethod); + return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); } - public static bool IsTraceMethod(string inputMethod) + public static bool IsTraceMethod(string method) { - return object.ReferenceEquals(Trace, inputMethod) | StringComparer.OrdinalIgnoreCase.Equals(Trace, inputMethod); + return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); } } } diff --git a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs index e029ebe8..1240a8c1 100644 --- a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs +++ b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs @@ -2,9 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Xunit; -using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Owin { From 026233770ef1da8d6b89b2a6fbc0bc3df7ecf430 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Fri, 23 Sep 2016 17:26:50 -0700 Subject: [PATCH 05/11] Added the equals method back --- src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index 5ef6be94..1b5e3bec 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -55,5 +55,10 @@ public static bool IsTraceMethod(string method) { return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); } + + public static bool Equals(string left, string right) + { + return StringComparer.OrdinalIgnoreCase.Equals(left, right); + } } } From 8346fa0c76c4ec0070115175a6114f743934be30 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Sat, 24 Sep 2016 09:03:13 -0700 Subject: [PATCH 06/11] Added support for the Head method --- src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index 1b5e3bec..fa42631f 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -10,6 +10,7 @@ public static class HttpMethods public const string Connect = "CONNECT"; public const string Delete = "DELETE"; public const string Get = "GET"; + public const string Head = "HEAD"; public const string Options = "OPTIONS"; public const string Patch = "PATCH"; public const string Post = "POST"; @@ -31,6 +32,10 @@ public static bool IsGetMethod(string method) return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); } + public static bool IsHeadMethod(string method){ + return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head,method); + } + public static bool IsOptionsMethod(string method) { return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); From 4e93c9749e5965e30f01e1676674969b23a2de91 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Sat, 24 Sep 2016 09:04:45 -0700 Subject: [PATCH 07/11] Spacing --- src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index fa42631f..ceb1c095 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -33,7 +33,7 @@ public static bool IsGetMethod(string method) } public static bool IsHeadMethod(string method){ - return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head,method); + return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); } public static bool IsOptionsMethod(string method) From 3759ad7b1cf90a57cfc924bd3e5829b3e532c045 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Sat, 24 Sep 2016 22:17:36 -0700 Subject: [PATCH 08/11] Reacting to pr comments --- .../HttpMethods.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index ceb1c095..7bd957a3 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -17,46 +17,47 @@ public static class HttpMethods public const string Put = "PUT"; public const string Trace = "TRACE"; - public static bool IsConnectMethod(string method) + public static bool IsConnect(string method) { return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); } - public static bool IsDeleteMethod(string method) + public static bool IsDelete(string method) { return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); } - public static bool IsGetMethod(string method) + public static bool IsGet(string method) { return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); } - public static bool IsHeadMethod(string method){ + public static bool IsHead(string method) + { return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); } - public static bool IsOptionsMethod(string method) + public static bool IsOptions(string method) { return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); } - public static bool IsPatchMethod(string method) + public static bool IsPatch(string method) { return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); } - public static bool IsPostMethod(string method) + public static bool IsPost(string method) { return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); } - public static bool IsPutMethod(string method) + public static bool IsPut(string method) { return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); } - public static bool IsTraceMethod(string method) + public static bool IsTrace(string method) { return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); } From d5edcabd8261a906e852e451808ac6a7aa7bc199 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Mon, 26 Sep 2016 22:45:50 -0700 Subject: [PATCH 09/11] Reacting to PR comments --- .../HttpMethod.cs | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs new file mode 100644 index 00000000..45ac317a --- /dev/null +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs @@ -0,0 +1,65 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; + +namespace Microsoft.AspNetCore.Http +{ + public static class HttpMethod + { + public static readonly string Connect = "CONNECT"; + public static readonly string Delete = "DELETE"; + public static readonly string Get = "GET"; + public static readonly string Head = "HEAD"; + public static readonly string Options = "OPTIONS"; + public static readonly string Patch = "PATCH"; + public static readonly string Post = "POST"; + public static readonly string Put = "PUT"; + public static readonly string Trace = "TRACE"; + + public static bool IsConnect(string method) + { + return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); + } + + public static bool IsDelete(string method) + { + return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); + } + + public static bool IsGet(string method) + { + return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); + } + + public static bool IsHead(string method) + { + return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); + } + + public static bool IsOptions(string method) + { + return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); + } + + public static bool IsPatch(string method) + { + return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); + } + + public static bool IsPost(string method) + { + return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); + } + + public static bool IsPut(string method) + { + return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); + } + + public static bool IsTrace(string method) + { + return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); + } + } +} From 80f0f21fde4ccbb249d83c789ce61578d03e2a3f Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Mon, 26 Sep 2016 22:48:33 -0700 Subject: [PATCH 10/11] Removing file with old name --- .../HttpMethods.cs | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs deleted file mode 100644 index 7bd957a3..00000000 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace Microsoft.AspNetCore.Http -{ - public static class HttpMethods - { - public const string Connect = "CONNECT"; - public const string Delete = "DELETE"; - public const string Get = "GET"; - public const string Head = "HEAD"; - public const string Options = "OPTIONS"; - public const string Patch = "PATCH"; - public const string Post = "POST"; - public const string Put = "PUT"; - public const string Trace = "TRACE"; - - public static bool IsConnect(string method) - { - return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method); - } - - public static bool IsDelete(string method) - { - return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method); - } - - public static bool IsGet(string method) - { - return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method); - } - - public static bool IsHead(string method) - { - return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method); - } - - public static bool IsOptions(string method) - { - return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method); - } - - public static bool IsPatch(string method) - { - return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method); - } - - public static bool IsPost(string method) - { - return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method); - } - - public static bool IsPut(string method) - { - return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method); - } - - public static bool IsTrace(string method) - { - return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method); - } - - public static bool Equals(string left, string right) - { - return StringComparer.OrdinalIgnoreCase.Equals(left, right); - } - } -} From c443c510a98ad7a9b1fb47088d044560a604d78f Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Mon, 26 Sep 2016 22:52:04 -0700 Subject: [PATCH 11/11] Tests now use new class name --- .../OwinFeatureCollectionTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs index 1240a8c1..4bd6679d 100644 --- a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs +++ b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs @@ -26,7 +26,7 @@ public void OwinHttpEnvironmentCanBeCreated() { var env = new Dictionary { - { "owin.RequestMethod", HttpMethods.Post }, + { "owin.RequestMethod", HttpMethod.Post }, { "owin.RequestPath", "/path" }, { "owin.RequestPathBase", "/pathBase" }, { "owin.RequestQueryString", "name=value" }, @@ -34,7 +34,7 @@ public void OwinHttpEnvironmentCanBeCreated() var features = new OwinFeatureCollection(env); var requestFeature = Get(features); - Assert.Equal(requestFeature.Method, HttpMethods.Post); + Assert.Equal(requestFeature.Method, HttpMethod.Post); Assert.Equal(requestFeature.Path, "/path"); Assert.Equal(requestFeature.PathBase, "/pathBase"); Assert.Equal(requestFeature.QueryString, "?name=value");