mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 19:08:16 +08:00
Remove multiple concurrent blank lines
SA1507
This commit is contained in:
@ -93,7 +93,6 @@ namespace Ocelot.UnitTests.Claims
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
private void GivenClaimsToThings(List<ClaimToThing> configuration)
|
||||
{
|
||||
_claimsToThings = configuration;
|
||||
|
@ -68,7 +68,6 @@ namespace Ocelot.UnitTests.Claims
|
||||
_middleware.Invoke(_downstreamContext).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
|
||||
private void GivenTheDownStreamRouteIs(DownstreamRoute downstreamRoute)
|
||||
{
|
||||
_downstreamContext.TemplatePlaceholderNameAndValues = downstreamRoute.TemplatePlaceholderNameAndValues;
|
||||
|
@ -869,7 +869,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
@ -1008,7 +1007,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
private void GivenAConfiguration(FileConfiguration fileConfiguration)
|
||||
{
|
||||
_fileConfiguration = fileConfiguration;
|
||||
|
@ -12,7 +12,6 @@ using Xunit;
|
||||
using Shouldly;
|
||||
using static Ocelot.UnitTests.Wait;
|
||||
|
||||
|
||||
namespace Ocelot.UnitTests.Configuration
|
||||
{
|
||||
public class ConsulFileConfigurationPollerTests : IDisposable
|
||||
|
@ -502,7 +502,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.WithUseServiceDiscovery(false)
|
||||
.Build();
|
||||
|
||||
|
||||
this.Given(x => x.GivenTheConfigIs(new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
@ -545,7 +544,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.WithUpstreamTemplatePattern(new UpstreamPathTemplate("(?i)/api/products/.*/$", 1))
|
||||
.Build();
|
||||
|
||||
|
||||
this.Given(x => x.GivenTheConfigIs(new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
@ -915,7 +913,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.Setup(x => x.Create(It.IsAny<FileGlobalConfiguration>())).Returns(serviceProviderConfiguration);
|
||||
}
|
||||
|
||||
|
||||
private void GivenTheFollowingRegionIsReturned(string region)
|
||||
{
|
||||
_regionCreator
|
||||
|
@ -38,8 +38,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void GivenTheConfigurationIs(FileConfiguration fileConfiguration)
|
||||
{
|
||||
_fileConfiguration = fileConfiguration;
|
||||
@ -59,4 +57,4 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.Verify(x => x.Get(), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_return_error_if_unable_to_set_file_configuration()
|
||||
{
|
||||
@ -110,4 +109,4 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.Verify(x => x.AddOrReplace(_configuration.Data), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_use_base_url_partial_placeholder()
|
||||
{
|
||||
|
@ -35,7 +35,6 @@ namespace Ocelot.UnitTests.Configuration
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_match_forward_slash_or_no_forward_slash_if_template_end_with_forward_slash()
|
||||
{
|
||||
|
@ -111,7 +111,6 @@ namespace Ocelot.UnitTests.Controllers
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
private void ThenTheNodeIsCalledCorrectly()
|
||||
{
|
||||
_node.Verify(x => x.Accept(It.IsAny<UpdateFileConfiguration>()), Times.Once);
|
||||
|
@ -70,7 +70,6 @@ namespace Ocelot.UnitTests.DependencyInjection
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_set_up_cache_manager()
|
||||
{
|
||||
@ -151,7 +150,6 @@ namespace Ocelot.UnitTests.DependencyInjection
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_set_up_without_passing_in_config()
|
||||
{
|
||||
|
@ -35,7 +35,6 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
|
||||
_downstreamRouteFinder = new Ocelot.DownstreamRouteFinder.Finder.DownstreamRouteFinder(_mockMatcher.Object, _finder.Object);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_return_highest_priority_when_first()
|
||||
{
|
||||
@ -182,7 +181,6 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_not_append_slash_to_upstream_url_path()
|
||||
{
|
||||
@ -598,7 +596,6 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_return_route_when_host_matches_but_null_host_on_same_path_first()
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder.UrlMatcher
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void can_match_down_stream_url_with_nothing_then_placeholder_no_value_is_blank()
|
||||
{
|
||||
@ -264,4 +263,4 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder.UrlMatcher
|
||||
_result = _finder.Find(_downstreamUrlPath, _downstreamPathTemplate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ namespace Ocelot.UnitTests.Errors
|
||||
private DownstreamContext _downstreamContext;
|
||||
private OcelotRequestDelegate _next;
|
||||
|
||||
|
||||
public ExceptionHandlerMiddlewareTests()
|
||||
{
|
||||
_provider = new Mock<IOcelotConfigurationProvider>();
|
||||
@ -174,7 +173,6 @@ namespace Ocelot.UnitTests.Errors
|
||||
.Setup(x => x.Get()).ReturnsAsync(response);
|
||||
}
|
||||
|
||||
|
||||
private void GivenAnExceptionWillNotBeThrownDownstream()
|
||||
{
|
||||
_shouldThrowAnException = false;
|
||||
|
@ -98,7 +98,6 @@ namespace Ocelot.UnitTests.Headers
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_replace_downstream_base_url_with_ocelot_base_url_and_path()
|
||||
{
|
||||
|
@ -35,7 +35,6 @@ namespace Ocelot.UnitTests.Infrastructure
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_return_ok_if_null_allowed_scopes()
|
||||
{
|
||||
@ -121,4 +120,4 @@ namespace Ocelot.UnitTests.Infrastructure
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,6 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
_factory.Verify(x => x.Get(_reRoute, _serviceProviderConfig), Times.Once);
|
||||
}
|
||||
|
||||
|
||||
private void GivenThereIsALoadBalancer(DownstreamReRoute reRoute, ILoadBalancer loadBalancer)
|
||||
{
|
||||
_reRoute = reRoute;
|
||||
|
@ -42,7 +42,6 @@ namespace Ocelot.UnitTests.Middleware
|
||||
.WithDownstreamReRoutes(downstreamReRoutes)
|
||||
.Build();
|
||||
|
||||
|
||||
var billDownstreamContext = new DownstreamContext(new DefaultHttpContext())
|
||||
{
|
||||
DownstreamResponse =
|
||||
|
@ -19,7 +19,6 @@ namespace Ocelot.UnitTests.RateLimit
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using System.IO;
|
||||
|
||||
|
||||
public class ClientRateLimitMiddlewareTests
|
||||
{
|
||||
private int _responseStatusCode;
|
||||
|
@ -165,7 +165,6 @@ namespace Ocelot.UnitTests.RequestId
|
||||
_repo.Verify(x => x.Update<string>("RequestId", _value), Times.Once);
|
||||
}
|
||||
|
||||
|
||||
private void GivenTheDownStreamRouteIs(DownstreamRoute downstreamRoute)
|
||||
{
|
||||
_downstreamContext.TemplatePlaceholderNameAndValues = downstreamRoute.TemplatePlaceholderNameAndValues;
|
||||
|
@ -41,7 +41,6 @@ namespace Ocelot.UnitTests.Requester
|
||||
.Returns(qosProvider);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_all_from_all_routes_provider_and_qos()
|
||||
{
|
||||
|
@ -111,7 +111,6 @@ namespace Ocelot.UnitTests.Requester
|
||||
_getResult.Data.ShouldBe(_qoSProvider);
|
||||
}
|
||||
|
||||
|
||||
private void GivenThereIsAQoSProvider(DownstreamReRoute reRoute, IQoSProvider qoSProvider)
|
||||
{
|
||||
_reRoute = reRoute;
|
||||
|
@ -45,7 +45,6 @@ namespace Ocelot.UnitTests.Responder
|
||||
ShouldMapErrorToStatusCode(OcelotErrorCode.RequestTimedOutError, HttpStatusCode.ServiceUnavailable);
|
||||
}
|
||||
|
||||
|
||||
[Theory]
|
||||
[InlineData(OcelotErrorCode.CannotAddDataError)]
|
||||
[InlineData(OcelotErrorCode.CannotFindDataError)]
|
||||
|
@ -27,7 +27,6 @@ namespace Ocelot.UnitTests.Responder
|
||||
private readonly DownstreamContext _downstreamContext;
|
||||
private OcelotRequestDelegate _next;
|
||||
|
||||
|
||||
public ResponderMiddlewareTests()
|
||||
{
|
||||
_responder = new Mock<IHttpResponder>();
|
||||
|
Reference in New Issue
Block a user