From fa7e6796c034f79e7321b1edd849f78e83e9cdaf Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Tue, 27 Sep 2016 11:56:42 -0700 Subject: [PATCH] Renamed HttpMethod class to HttpMethods to avoid conflicts --- .../{HttpMethod.cs => HttpMethods.cs} | 2 +- .../OwinFeatureCollectionTests.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/Microsoft.AspNetCore.Http.Abstractions/{HttpMethod.cs => HttpMethods.cs} (98%) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs similarity index 98% rename from src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs rename to src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs index 45ac317a..1ccee896 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethod.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Http { - public static class HttpMethod + public static class HttpMethods { public static readonly string Connect = "CONNECT"; public static readonly string Delete = "DELETE"; diff --git a/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs b/test/Microsoft.AspNetCore.Owin.Tests/OwinFeatureCollectionTests.cs index 4bd6679d..792d8548 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", HttpMethod.Post }, + { "owin.RequestMethod", HttpMethods.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, HttpMethod.Post); + Assert.Equal(requestFeature.Method, HttpMethods.Post); Assert.Equal(requestFeature.Path, "/path"); Assert.Equal(requestFeature.PathBase, "/pathBase"); Assert.Equal(requestFeature.QueryString, "?name=value"); @@ -45,7 +45,7 @@ public void OwinHttpEnvironmentCanBeModified() { var env = new Dictionary { - { "owin.RequestMethod", "POST" }, + { "owin.RequestMethod", HttpMethods.Post }, { "owin.RequestPath", "/path" }, { "owin.RequestPathBase", "/pathBase" }, { "owin.RequestQueryString", "name=value" }, @@ -53,12 +53,12 @@ public void OwinHttpEnvironmentCanBeModified() var features = new OwinFeatureCollection(env); var requestFeature = Get(features); - requestFeature.Method = "GET"; + requestFeature.Method = HttpMethods.Get; requestFeature.Path = "/path2"; requestFeature.PathBase = "/pathBase2"; requestFeature.QueryString = "?name=value2"; - Assert.Equal("GET", Get(env, "owin.RequestMethod")); + Assert.Equal(HttpMethods.Get, Get(env, "owin.RequestMethod")); Assert.Equal("/path2", Get(env, "owin.RequestPath")); Assert.Equal("/pathBase2", Get(env, "owin.RequestPathBase")); Assert.Equal("name=value2", Get(env, "owin.RequestQueryString"));