mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 12:10:50 +08:00 
			
		
		
		
	changed upstream http method to use httpmethod class in .net
This commit is contained in:
		@@ -61,7 +61,13 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
        [Fact]
 | 
			
		||||
        public void should_call_scoped_data_repository_correctly()
 | 
			
		||||
        {
 | 
			
		||||
            this.Given(x => x.GivenTheDownStreamRouteFinderReturns(new DownstreamRoute(new List<UrlPathPlaceholderNameAndValue>(), new ReRouteBuilder().WithDownstreamPathTemplate("any old string").Build())))
 | 
			
		||||
            this.Given(x => x.GivenTheDownStreamRouteFinderReturns(
 | 
			
		||||
                new DownstreamRoute(
 | 
			
		||||
                    new List<UrlPathPlaceholderNameAndValue>(), 
 | 
			
		||||
                    new ReRouteBuilder()
 | 
			
		||||
                        .WithDownstreamPathTemplate("any old string")
 | 
			
		||||
                        .WithUpstreamHttpMethod("Get")
 | 
			
		||||
                        .Build())))
 | 
			
		||||
                .When(x => x.WhenICallTheMiddleware())
 | 
			
		||||
                .Then(x => x.ThenTheScopedDataRepositoryIsCalledCorrectly())
 | 
			
		||||
                .BDDfy();
 | 
			
		||||
 
 | 
			
		||||
@@ -58,6 +58,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                    x => x.ThenTheFollowingIsReturned(new DownstreamRoute(new List<UrlPathPlaceholderNameAndValue>(),
 | 
			
		||||
                        new ReRouteBuilder()
 | 
			
		||||
                            .WithDownstreamPathTemplate("someDownstreamPath")
 | 
			
		||||
                            .WithUpstreamHttpMethod("Get")
 | 
			
		||||
                            .Build()
 | 
			
		||||
                        )))
 | 
			
		||||
                .And(x => x.ThenTheUrlMatcherIsCalledCorrectly())
 | 
			
		||||
@@ -95,6 +96,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                    x => x.ThenTheFollowingIsReturned(new DownstreamRoute(new List<UrlPathPlaceholderNameAndValue>(),
 | 
			
		||||
                        new ReRouteBuilder()
 | 
			
		||||
                            .WithDownstreamPathTemplate("someDownstreamPathForAPost")
 | 
			
		||||
                            .WithUpstreamHttpMethod("Post")
 | 
			
		||||
                            .Build()
 | 
			
		||||
                        )))
 | 
			
		||||
                .BDDfy();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user