mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 19:50:49 +08:00 
			
		
		
		
	started messing around with admin area
This commit is contained in:
		@@ -48,7 +48,8 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                        .WithUpstreamHttpMethod("Get")
 | 
			
		||||
                        .WithUpstreamTemplatePattern("someUpstreamPath")
 | 
			
		||||
                        .Build()
 | 
			
		||||
                }))
 | 
			
		||||
                }, string.Empty
 | 
			
		||||
                ))
 | 
			
		||||
                .And(x => x.GivenTheUrlMatcherReturns(new OkResponse<UrlMatch>(new UrlMatch(true))))
 | 
			
		||||
                .And(x => x.GivenTheUpstreamHttpMethodIs("Get"))
 | 
			
		||||
                .When(x => x.WhenICallTheFinder())
 | 
			
		||||
@@ -80,7 +81,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                        .WithUpstreamHttpMethod("Get")
 | 
			
		||||
                        .WithUpstreamTemplatePattern("someUpstreamPath")
 | 
			
		||||
                        .Build()
 | 
			
		||||
                }
 | 
			
		||||
                }, string.Empty
 | 
			
		||||
                    ))
 | 
			
		||||
                .And(x => x.GivenTheUrlMatcherReturns(new OkResponse<UrlMatch>(new UrlMatch(true))))
 | 
			
		||||
                .And(x => x.GivenTheUpstreamHttpMethodIs("Get"))
 | 
			
		||||
@@ -118,7 +119,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                        .WithUpstreamHttpMethod("Post")
 | 
			
		||||
                        .WithUpstreamTemplatePattern("")
 | 
			
		||||
                        .Build()
 | 
			
		||||
                }
 | 
			
		||||
                }, string.Empty
 | 
			
		||||
                    ))
 | 
			
		||||
                .And(x => x.GivenTheUrlMatcherReturns(new OkResponse<UrlMatch>(new UrlMatch(true))))
 | 
			
		||||
                .And(x => x.GivenTheUpstreamHttpMethodIs("Post"))
 | 
			
		||||
@@ -145,7 +146,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                        .WithUpstreamHttpMethod("Get")
 | 
			
		||||
                        .WithUpstreamTemplatePattern("somePath")
 | 
			
		||||
                        .Build(),   
 | 
			
		||||
                     }
 | 
			
		||||
                     }, string.Empty
 | 
			
		||||
                 ))
 | 
			
		||||
                 .And(x => x.GivenTheUrlMatcherReturns(new OkResponse<UrlMatch>(new UrlMatch(false))))
 | 
			
		||||
                 .And(x => x.GivenTheUpstreamHttpMethodIs("Get"))
 | 
			
		||||
@@ -193,12 +194,12 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
 | 
			
		||||
                .Returns(_match);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void GivenTheConfigurationIs(List<ReRoute> reRoutesConfig)
 | 
			
		||||
        private void GivenTheConfigurationIs(List<ReRoute> reRoutesConfig, string adminPath)
 | 
			
		||||
        {
 | 
			
		||||
            _reRoutesConfig = reRoutesConfig;
 | 
			
		||||
            _mockConfig
 | 
			
		||||
                .Setup(x => x.Get())
 | 
			
		||||
                .ReturnsAsync(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(_reRoutesConfig)));
 | 
			
		||||
                .ReturnsAsync(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(_reRoutesConfig, adminPath)));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void GivenThereIsAnUpstreamUrlPath(string upstreamUrlPath)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user