From 167fbb3dafb76abab4969bf9255d428282473518 Mon Sep 17 00:00:00 2001 From: Philip Wood Date: Sat, 3 Mar 2018 13:26:27 +0000 Subject: [PATCH] Remove multiple concurrent blank lines SA1507 --- src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs | 1 - src/Ocelot/Configuration/Builder/DownstreamReRouteBuilder.cs | 1 - .../Configuration/Creator/FileOcelotConfigurationCreator.cs | 1 - .../Configuration/Creator/UpstreamTemplatePatternCreator.cs | 1 - src/Ocelot/Configuration/QoSOptions.cs | 3 +-- src/Ocelot/DependencyInjection/OcelotBuilder.cs | 3 +-- .../Middleware/DownstreamRouteFinderMiddleware.cs | 1 - src/Ocelot/DownstreamUrlCreator/UrlBuilder.cs | 1 - src/Ocelot/Infrastructure/Claims/Parser/ClaimsParser.cs | 2 -- src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs | 1 - src/Ocelot/RateLimit/ClientRateLimitProcessor.cs | 1 - src/Ocelot/RequestId/Middleware/ReRouteRequestIdMiddleware.cs | 1 - test/Ocelot.AcceptanceTests/AggregateTests.cs | 1 - test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs | 1 - test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs | 4 ---- test/Ocelot.AcceptanceTests/ConfigurationInConsulTests.cs | 1 - test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs | 1 - test/Ocelot.AcceptanceTests/HeaderTests.cs | 1 - test/Ocelot.AcceptanceTests/RoutingTests.cs | 3 --- test/Ocelot.AcceptanceTests/UpstreamHostTests.cs | 1 - test/Ocelot.IntegrationTests/AdministrationTests.cs | 1 - test/Ocelot.UnitTests/Claims/AddClaimsToRequestTests.cs | 1 - test/Ocelot.UnitTests/Claims/ClaimsBuilderMiddlewareTests.cs | 1 - .../Configuration/ConfigurationFluentValidationTests.cs | 2 -- .../Configuration/ConsulFileConfigurationPollerTests.cs | 1 - .../Configuration/FileConfigurationCreatorTests.cs | 3 --- .../Configuration/FileConfigurationProviderTests.cs | 4 +--- .../Configuration/FileConfigurationSetterTests.cs | 3 +-- .../Configuration/HeaderFindAndReplaceCreatorTests.cs | 1 - .../Configuration/UpstreamTemplatePatternCreatorTests.cs | 1 - .../Controllers/FileConfigurationControllerTests.cs | 1 - .../DependencyInjection/OcelotBuilderTests.cs | 2 -- .../DownstreamRouteFinder/DownstreamRouteFinderTests.cs | 3 --- .../UrlMatcher/UrlPathPlaceholderNameAndValueFinderTests.cs | 3 +-- .../Errors/ExceptionHandlerMiddlewareTests.cs | 2 -- .../Headers/HttpResponseHeaderReplacerTests.cs | 1 - test/Ocelot.UnitTests/Infrastructure/ScopesAuthoriserTests.cs | 3 +-- test/Ocelot.UnitTests/LoadBalancer/LoadBalancerHouseTests.cs | 1 - .../Middleware/SimpleJsonResponseAggregatorTests.cs | 1 - .../RateLimit/ClientRateLimitMiddlewareTests.cs | 1 - .../RequestId/ReRouteRequestIdMiddlewareTests.cs | 1 - .../Requester/DelegatingHandlerHandlerProviderFactoryTests.cs | 1 - test/Ocelot.UnitTests/Requester/QosProviderHouseTests.cs | 1 - .../Responder/ErrorsToHttpStatusCodeMapperTests.cs | 1 - test/Ocelot.UnitTests/Responder/ResponderMiddlewareTests.cs | 1 - 45 files changed, 6 insertions(+), 65 deletions(-) diff --git a/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs b/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs index 873c4cf7..3d128b72 100644 --- a/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs +++ b/src/Ocelot/Cache/Middleware/OutputCacheMiddleware.cs @@ -123,7 +123,6 @@ namespace Ocelot.Cache.Middleware var contentHeaders = response?.Content?.Headers.ToDictionary(v => v.Key, v => v.Value); - var cached = new CachedResponse(statusCode, headers, body, contentHeaders); return cached; } diff --git a/src/Ocelot/Configuration/Builder/DownstreamReRouteBuilder.cs b/src/Ocelot/Configuration/Builder/DownstreamReRouteBuilder.cs index bc860424..ca98a823 100644 --- a/src/Ocelot/Configuration/Builder/DownstreamReRouteBuilder.cs +++ b/src/Ocelot/Configuration/Builder/DownstreamReRouteBuilder.cs @@ -216,7 +216,6 @@ namespace Ocelot.Configuration.Builder return this; } - public DownstreamReRoute Build() { return new DownstreamReRoute( diff --git a/src/Ocelot/Configuration/Creator/FileOcelotConfigurationCreator.cs b/src/Ocelot/Configuration/Creator/FileOcelotConfigurationCreator.cs index fbc58020..a35c7d54 100644 --- a/src/Ocelot/Configuration/Creator/FileOcelotConfigurationCreator.cs +++ b/src/Ocelot/Configuration/Creator/FileOcelotConfigurationCreator.cs @@ -35,7 +35,6 @@ namespace Ocelot.Configuration.Creator private readonly IHeaderFindAndReplaceCreator _headerFAndRCreator; private readonly IDownstreamAddressesCreator _downstreamAddressesCreator; - public FileOcelotConfigurationCreator( IOptions options, IConfigurationValidator configurationValidator, diff --git a/src/Ocelot/Configuration/Creator/UpstreamTemplatePatternCreator.cs b/src/Ocelot/Configuration/Creator/UpstreamTemplatePatternCreator.cs index 1700472a..833c61db 100644 --- a/src/Ocelot/Configuration/Creator/UpstreamTemplatePatternCreator.cs +++ b/src/Ocelot/Configuration/Creator/UpstreamTemplatePatternCreator.cs @@ -67,7 +67,6 @@ namespace Ocelot.Configuration.Creator return false; } - private bool IsPlaceHolder(string upstreamTemplate, int i) { return upstreamTemplate[i] == '{'; diff --git a/src/Ocelot/Configuration/QoSOptions.cs b/src/Ocelot/Configuration/QoSOptions.cs index 60e7cc03..651bd506 100644 --- a/src/Ocelot/Configuration/QoSOptions.cs +++ b/src/Ocelot/Configuration/QoSOptions.cs @@ -14,8 +14,7 @@ namespace Ocelot.Configuration DurationOfBreak = durationofBreak; TimeoutValue = timeoutValue; TimeoutStrategy = timeoutStrategy; - } - + } public int ExceptionsAllowedBeforeBreaking { get; private set; } diff --git a/src/Ocelot/DependencyInjection/OcelotBuilder.cs b/src/Ocelot/DependencyInjection/OcelotBuilder.cs index 6501b619..350eb566 100644 --- a/src/Ocelot/DependencyInjection/OcelotBuilder.cs +++ b/src/Ocelot/DependencyInjection/OcelotBuilder.cs @@ -264,8 +264,7 @@ namespace Ocelot.DependencyInjection var urlFinder = new BaseUrlFinder(_configurationRoot); var baseSchemeUrlAndPort = urlFinder.Find(); - JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); - + JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); _services.AddAuthentication(IdentityServerAuthenticationDefaults.AuthenticationScheme) .AddIdentityServerAuthentication(o => diff --git a/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs b/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs index 4b467b95..e5348410 100644 --- a/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs +++ b/src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs @@ -17,7 +17,6 @@ namespace Ocelot.DownstreamRouteFinder.Middleware private readonly IOcelotConfigurationProvider _configProvider; private readonly IMultiplexer _multiplexer; - public DownstreamRouteFinderMiddleware(OcelotRequestDelegate next, IOcelotLoggerFactory loggerFactory, IDownstreamRouteFinder downstreamRouteFinder, diff --git a/src/Ocelot/DownstreamUrlCreator/UrlBuilder.cs b/src/Ocelot/DownstreamUrlCreator/UrlBuilder.cs index 80f2507d..3a2f8d2e 100644 --- a/src/Ocelot/DownstreamUrlCreator/UrlBuilder.cs +++ b/src/Ocelot/DownstreamUrlCreator/UrlBuilder.cs @@ -25,7 +25,6 @@ namespace Ocelot.DownstreamUrlCreator return new ErrorResponse(new List { new DownstreamHostNullOrEmptyError() }); } - var builder = new UriBuilder { Host = downstreamHostAndPort.DownstreamHost, diff --git a/src/Ocelot/Infrastructure/Claims/Parser/ClaimsParser.cs b/src/Ocelot/Infrastructure/Claims/Parser/ClaimsParser.cs index b3a028b3..1af0acbc 100644 --- a/src/Ocelot/Infrastructure/Claims/Parser/ClaimsParser.cs +++ b/src/Ocelot/Infrastructure/Claims/Parser/ClaimsParser.cs @@ -37,7 +37,6 @@ return new OkResponse(value); } - public Response> GetValuesByClaimType(IEnumerable claims, string claimType) { List values = new List(); @@ -47,7 +46,6 @@ return new OkResponse>(values); } - private Response GetValue(IEnumerable claims, string key) { var claim = claims.FirstOrDefault(c => c.Type == key); diff --git a/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs b/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs index efc00e5e..26d55b1f 100644 --- a/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs +++ b/src/Ocelot/LoadBalancer/LoadBalancers/RoundRobin.cs @@ -17,7 +17,6 @@ namespace Ocelot.LoadBalancer.LoadBalancers _services = services; } - public async Task> Lease() { var services = await _services.Invoke(); diff --git a/src/Ocelot/RateLimit/ClientRateLimitProcessor.cs b/src/Ocelot/RateLimit/ClientRateLimitProcessor.cs index 9a4a4ce3..65a04504 100644 --- a/src/Ocelot/RateLimit/ClientRateLimitProcessor.cs +++ b/src/Ocelot/RateLimit/ClientRateLimitProcessor.cs @@ -23,7 +23,6 @@ namespace Ocelot.RateLimit return _core.ProcessRequest(requestIdentity, option); } - public int RetryAfterFrom(DateTime timestamp, RateLimitRule rule) { return _core.RetryAfterFrom(timestamp, rule); diff --git a/src/Ocelot/RequestId/Middleware/ReRouteRequestIdMiddleware.cs b/src/Ocelot/RequestId/Middleware/ReRouteRequestIdMiddleware.cs index 0b146b27..32ee6c68 100644 --- a/src/Ocelot/RequestId/Middleware/ReRouteRequestIdMiddleware.cs +++ b/src/Ocelot/RequestId/Middleware/ReRouteRequestIdMiddleware.cs @@ -18,7 +18,6 @@ namespace Ocelot.RequestId.Middleware private readonly IOcelotLogger _logger; private readonly IRequestScopedDataRepository _requestScopedDataRepository; - public ReRouteRequestIdMiddleware(OcelotRequestDelegate next, IOcelotLoggerFactory loggerFactory, IRequestScopedDataRepository requestScopedDataRepository) diff --git a/test/Ocelot.AcceptanceTests/AggregateTests.cs b/test/Ocelot.AcceptanceTests/AggregateTests.cs index c0ed2de2..8510fd1b 100644 --- a/test/Ocelot.AcceptanceTests/AggregateTests.cs +++ b/test/Ocelot.AcceptanceTests/AggregateTests.cs @@ -229,7 +229,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_be_thread_safe() { diff --git a/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs b/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs index 52a589c1..a7411ebe 100644 --- a/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs +++ b/test/Ocelot.AcceptanceTests/ButterflyTracingTests.cs @@ -104,7 +104,6 @@ namespace Ocelot.AcceptanceTests .And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Tom")) .BDDfy(); - var commandOnAllStateMachines = WaitFor(5000).Until(() => _butterflyCalled == 4); commandOnAllStateMachines.ShouldBeTrue(); diff --git a/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs b/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs index fb09591b..dc9d5eef 100644 --- a/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs +++ b/test/Ocelot.AcceptanceTests/ClientRateLimitTests.cs @@ -20,13 +20,11 @@ namespace Ocelot.AcceptanceTests private readonly Steps _steps; private int _counterOne; - public ClientRateLimitTests() { _steps = new Steps(); } - public void Dispose() { _builder?.Dispose(); @@ -92,7 +90,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_call_middleware_withWhitelistClient() { @@ -147,7 +144,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - private void GivenThereIsAServiceRunningOn(string baseUrl, string basePath) { _builder = new WebHostBuilder() diff --git a/test/Ocelot.AcceptanceTests/ConfigurationInConsulTests.cs b/test/Ocelot.AcceptanceTests/ConfigurationInConsulTests.cs index db617718..c0dfe1ef 100644 --- a/test/Ocelot.AcceptanceTests/ConfigurationInConsulTests.cs +++ b/test/Ocelot.AcceptanceTests/ConfigurationInConsulTests.cs @@ -175,7 +175,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_load_configuration_out_of_consul_if_it_is_changed() { diff --git a/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs b/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs index 2171f72d..0cf33d4b 100644 --- a/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs +++ b/test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs @@ -286,7 +286,6 @@ namespace Ocelot.AcceptanceTests .And(x => x.ThenTheCounterIs(1)) .BDDfy(); } - [Fact(Skip = "This is just an example to show how you could hook into Ocelot pipeline with your own middleware. At the moment you must use Response.OnCompleted callback and cannot change the response :( I will see if this can be changed one day!")] public void should_fix_issue_237() diff --git a/test/Ocelot.AcceptanceTests/HeaderTests.cs b/test/Ocelot.AcceptanceTests/HeaderTests.cs index e0bd67c8..b5a2711e 100644 --- a/test/Ocelot.AcceptanceTests/HeaderTests.cs +++ b/test/Ocelot.AcceptanceTests/HeaderTests.cs @@ -186,7 +186,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - private void GivenThereIsAServiceRunningOn(string baseUrl, string basePath, int statusCode, string headerKey) { _builder = new WebHostBuilder() diff --git a/test/Ocelot.AcceptanceTests/RoutingTests.cs b/test/Ocelot.AcceptanceTests/RoutingTests.cs index ea748a04..0a16e565 100644 --- a/test/Ocelot.AcceptanceTests/RoutingTests.cs +++ b/test/Ocelot.AcceptanceTests/RoutingTests.cs @@ -543,7 +543,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_return_response_200_with_complex_url_that_starts_with_placeholder() { @@ -578,7 +577,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_not_add_trailing_slash_to_downstream_url() { @@ -834,7 +832,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_fix_145() { diff --git a/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs b/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs index 16e123a7..a6a495a1 100644 --- a/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs +++ b/test/Ocelot.AcceptanceTests/UpstreamHostTests.cs @@ -58,7 +58,6 @@ namespace Ocelot.AcceptanceTests .BDDfy(); } - [Fact] public void should_return_response_200_with_simple_url_and_hosts_match_multiple_re_routes() { diff --git a/test/Ocelot.IntegrationTests/AdministrationTests.cs b/test/Ocelot.IntegrationTests/AdministrationTests.cs index e9fc390d..763d642c 100644 --- a/test/Ocelot.IntegrationTests/AdministrationTests.cs +++ b/test/Ocelot.IntegrationTests/AdministrationTests.cs @@ -484,7 +484,6 @@ namespace Ocelot.IntegrationTests app.UseOcelot().Wait(); }); - _builderTwo = _webHostBuilderTwo.Build(); _builderTwo.Start(); diff --git a/test/Ocelot.UnitTests/Claims/AddClaimsToRequestTests.cs b/test/Ocelot.UnitTests/Claims/AddClaimsToRequestTests.cs index cdb5c4c7..33ff1e06 100644 --- a/test/Ocelot.UnitTests/Claims/AddClaimsToRequestTests.cs +++ b/test/Ocelot.UnitTests/Claims/AddClaimsToRequestTests.cs @@ -93,7 +93,6 @@ namespace Ocelot.UnitTests.Claims .BDDfy(); } - private void GivenClaimsToThings(List configuration) { _claimsToThings = configuration; diff --git a/test/Ocelot.UnitTests/Claims/ClaimsBuilderMiddlewareTests.cs b/test/Ocelot.UnitTests/Claims/ClaimsBuilderMiddlewareTests.cs index be266f9e..5b5e386c 100644 --- a/test/Ocelot.UnitTests/Claims/ClaimsBuilderMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Claims/ClaimsBuilderMiddlewareTests.cs @@ -68,7 +68,6 @@ namespace Ocelot.UnitTests.Claims _middleware.Invoke(_downstreamContext).GetAwaiter().GetResult(); } - private void GivenTheDownStreamRouteIs(DownstreamRoute downstreamRoute) { _downstreamContext.TemplatePlaceholderNameAndValues = downstreamRoute.TemplatePlaceholderNameAndValues; diff --git a/test/Ocelot.UnitTests/Configuration/ConfigurationFluentValidationTests.cs b/test/Ocelot.UnitTests/Configuration/ConfigurationFluentValidationTests.cs index 632461fc..b4dc45b0 100644 --- a/test/Ocelot.UnitTests/Configuration/ConfigurationFluentValidationTests.cs +++ b/test/Ocelot.UnitTests/Configuration/ConfigurationFluentValidationTests.cs @@ -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; diff --git a/test/Ocelot.UnitTests/Configuration/ConsulFileConfigurationPollerTests.cs b/test/Ocelot.UnitTests/Configuration/ConsulFileConfigurationPollerTests.cs index 10c8a012..b743b598 100644 --- a/test/Ocelot.UnitTests/Configuration/ConsulFileConfigurationPollerTests.cs +++ b/test/Ocelot.UnitTests/Configuration/ConsulFileConfigurationPollerTests.cs @@ -12,7 +12,6 @@ using Xunit; using Shouldly; using static Ocelot.UnitTests.Wait; - namespace Ocelot.UnitTests.Configuration { public class ConsulFileConfigurationPollerTests : IDisposable diff --git a/test/Ocelot.UnitTests/Configuration/FileConfigurationCreatorTests.cs b/test/Ocelot.UnitTests/Configuration/FileConfigurationCreatorTests.cs index cb6615bf..4de07053 100644 --- a/test/Ocelot.UnitTests/Configuration/FileConfigurationCreatorTests.cs +++ b/test/Ocelot.UnitTests/Configuration/FileConfigurationCreatorTests.cs @@ -502,7 +502,6 @@ namespace Ocelot.UnitTests.Configuration .WithUseServiceDiscovery(false) .Build(); - this.Given(x => x.GivenTheConfigIs(new FileConfiguration { ReRoutes = new List @@ -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 @@ -915,7 +913,6 @@ namespace Ocelot.UnitTests.Configuration .Setup(x => x.Create(It.IsAny())).Returns(serviceProviderConfiguration); } - private void GivenTheFollowingRegionIsReturned(string region) { _regionCreator diff --git a/test/Ocelot.UnitTests/Configuration/FileConfigurationProviderTests.cs b/test/Ocelot.UnitTests/Configuration/FileConfigurationProviderTests.cs index be3df6cc..506da50c 100644 --- a/test/Ocelot.UnitTests/Configuration/FileConfigurationProviderTests.cs +++ b/test/Ocelot.UnitTests/Configuration/FileConfigurationProviderTests.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/test/Ocelot.UnitTests/Configuration/FileConfigurationSetterTests.cs b/test/Ocelot.UnitTests/Configuration/FileConfigurationSetterTests.cs index 60365661..e16148f2 100644 --- a/test/Ocelot.UnitTests/Configuration/FileConfigurationSetterTests.cs +++ b/test/Ocelot.UnitTests/Configuration/FileConfigurationSetterTests.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/test/Ocelot.UnitTests/Configuration/HeaderFindAndReplaceCreatorTests.cs b/test/Ocelot.UnitTests/Configuration/HeaderFindAndReplaceCreatorTests.cs index 3c817295..37ee8957 100644 --- a/test/Ocelot.UnitTests/Configuration/HeaderFindAndReplaceCreatorTests.cs +++ b/test/Ocelot.UnitTests/Configuration/HeaderFindAndReplaceCreatorTests.cs @@ -84,7 +84,6 @@ namespace Ocelot.UnitTests.Configuration .BDDfy(); } - [Fact] public void should_use_base_url_partial_placeholder() { diff --git a/test/Ocelot.UnitTests/Configuration/UpstreamTemplatePatternCreatorTests.cs b/test/Ocelot.UnitTests/Configuration/UpstreamTemplatePatternCreatorTests.cs index c8e79675..9dce0e50 100644 --- a/test/Ocelot.UnitTests/Configuration/UpstreamTemplatePatternCreatorTests.cs +++ b/test/Ocelot.UnitTests/Configuration/UpstreamTemplatePatternCreatorTests.cs @@ -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() { diff --git a/test/Ocelot.UnitTests/Controllers/FileConfigurationControllerTests.cs b/test/Ocelot.UnitTests/Controllers/FileConfigurationControllerTests.cs index 0d95f0ea..c0ae8b87 100644 --- a/test/Ocelot.UnitTests/Controllers/FileConfigurationControllerTests.cs +++ b/test/Ocelot.UnitTests/Controllers/FileConfigurationControllerTests.cs @@ -111,7 +111,6 @@ namespace Ocelot.UnitTests.Controllers .BDDfy(); } - private void ThenTheNodeIsCalledCorrectly() { _node.Verify(x => x.Accept(It.IsAny()), Times.Once); diff --git a/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs b/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs index e33ee812..8ed1a327 100644 --- a/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs +++ b/test/Ocelot.UnitTests/DependencyInjection/OcelotBuilderTests.cs @@ -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() { diff --git a/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderTests.cs b/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderTests.cs index b7761c60..cb5c2a67 100644 --- a/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderTests.cs +++ b/test/Ocelot.UnitTests/DownstreamRouteFinder/DownstreamRouteFinderTests.cs @@ -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() { diff --git a/test/Ocelot.UnitTests/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValueFinderTests.cs b/test/Ocelot.UnitTests/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValueFinderTests.cs index afd1b3ae..29bc8fcd 100644 --- a/test/Ocelot.UnitTests/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValueFinderTests.cs +++ b/test/Ocelot.UnitTests/DownstreamRouteFinder/UrlMatcher/UrlPathPlaceholderNameAndValueFinderTests.cs @@ -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); } } -} \ No newline at end of file +} diff --git a/test/Ocelot.UnitTests/Errors/ExceptionHandlerMiddlewareTests.cs b/test/Ocelot.UnitTests/Errors/ExceptionHandlerMiddlewareTests.cs index e6c3e7ca..89eaaa38 100644 --- a/test/Ocelot.UnitTests/Errors/ExceptionHandlerMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Errors/ExceptionHandlerMiddlewareTests.cs @@ -29,7 +29,6 @@ namespace Ocelot.UnitTests.Errors private DownstreamContext _downstreamContext; private OcelotRequestDelegate _next; - public ExceptionHandlerMiddlewareTests() { _provider = new Mock(); @@ -174,7 +173,6 @@ namespace Ocelot.UnitTests.Errors .Setup(x => x.Get()).ReturnsAsync(response); } - private void GivenAnExceptionWillNotBeThrownDownstream() { _shouldThrowAnException = false; diff --git a/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs b/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs index 6b65bb67..95ae6e6d 100644 --- a/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs +++ b/test/Ocelot.UnitTests/Headers/HttpResponseHeaderReplacerTests.cs @@ -98,7 +98,6 @@ namespace Ocelot.UnitTests.Headers .BDDfy(); } - [Fact] public void should_replace_downstream_base_url_with_ocelot_base_url_and_path() { diff --git a/test/Ocelot.UnitTests/Infrastructure/ScopesAuthoriserTests.cs b/test/Ocelot.UnitTests/Infrastructure/ScopesAuthoriserTests.cs index 1d476db3..08f6a46d 100644 --- a/test/Ocelot.UnitTests/Infrastructure/ScopesAuthoriserTests.cs +++ b/test/Ocelot.UnitTests/Infrastructure/ScopesAuthoriserTests.cs @@ -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 { } } -} \ No newline at end of file +} diff --git a/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerHouseTests.cs b/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerHouseTests.cs index f5604ab1..2a4d3a24 100644 --- a/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerHouseTests.cs +++ b/test/Ocelot.UnitTests/LoadBalancer/LoadBalancerHouseTests.cs @@ -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; diff --git a/test/Ocelot.UnitTests/Middleware/SimpleJsonResponseAggregatorTests.cs b/test/Ocelot.UnitTests/Middleware/SimpleJsonResponseAggregatorTests.cs index b5fabaee..27d1b7e0 100644 --- a/test/Ocelot.UnitTests/Middleware/SimpleJsonResponseAggregatorTests.cs +++ b/test/Ocelot.UnitTests/Middleware/SimpleJsonResponseAggregatorTests.cs @@ -42,7 +42,6 @@ namespace Ocelot.UnitTests.Middleware .WithDownstreamReRoutes(downstreamReRoutes) .Build(); - var billDownstreamContext = new DownstreamContext(new DefaultHttpContext()) { DownstreamResponse = diff --git a/test/Ocelot.UnitTests/RateLimit/ClientRateLimitMiddlewareTests.cs b/test/Ocelot.UnitTests/RateLimit/ClientRateLimitMiddlewareTests.cs index 168781bc..57d2fdc8 100644 --- a/test/Ocelot.UnitTests/RateLimit/ClientRateLimitMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/RateLimit/ClientRateLimitMiddlewareTests.cs @@ -19,7 +19,6 @@ namespace Ocelot.UnitTests.RateLimit using Microsoft.Extensions.Caching.Memory; using System.IO; - public class ClientRateLimitMiddlewareTests { private int _responseStatusCode; diff --git a/test/Ocelot.UnitTests/RequestId/ReRouteRequestIdMiddlewareTests.cs b/test/Ocelot.UnitTests/RequestId/ReRouteRequestIdMiddlewareTests.cs index 40276547..c49f2c6a 100644 --- a/test/Ocelot.UnitTests/RequestId/ReRouteRequestIdMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/RequestId/ReRouteRequestIdMiddlewareTests.cs @@ -165,7 +165,6 @@ namespace Ocelot.UnitTests.RequestId _repo.Verify(x => x.Update("RequestId", _value), Times.Once); } - private void GivenTheDownStreamRouteIs(DownstreamRoute downstreamRoute) { _downstreamContext.TemplatePlaceholderNameAndValues = downstreamRoute.TemplatePlaceholderNameAndValues; diff --git a/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs b/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs index e6942681..c63e04d2 100644 --- a/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs +++ b/test/Ocelot.UnitTests/Requester/DelegatingHandlerHandlerProviderFactoryTests.cs @@ -41,7 +41,6 @@ namespace Ocelot.UnitTests.Requester .Returns(qosProvider); } - [Fact] public void should_all_from_all_routes_provider_and_qos() { diff --git a/test/Ocelot.UnitTests/Requester/QosProviderHouseTests.cs b/test/Ocelot.UnitTests/Requester/QosProviderHouseTests.cs index 487a3509..f6095034 100644 --- a/test/Ocelot.UnitTests/Requester/QosProviderHouseTests.cs +++ b/test/Ocelot.UnitTests/Requester/QosProviderHouseTests.cs @@ -111,7 +111,6 @@ namespace Ocelot.UnitTests.Requester _getResult.Data.ShouldBe(_qoSProvider); } - private void GivenThereIsAQoSProvider(DownstreamReRoute reRoute, IQoSProvider qoSProvider) { _reRoute = reRoute; diff --git a/test/Ocelot.UnitTests/Responder/ErrorsToHttpStatusCodeMapperTests.cs b/test/Ocelot.UnitTests/Responder/ErrorsToHttpStatusCodeMapperTests.cs index 9922df6a..977a0b12 100644 --- a/test/Ocelot.UnitTests/Responder/ErrorsToHttpStatusCodeMapperTests.cs +++ b/test/Ocelot.UnitTests/Responder/ErrorsToHttpStatusCodeMapperTests.cs @@ -45,7 +45,6 @@ namespace Ocelot.UnitTests.Responder ShouldMapErrorToStatusCode(OcelotErrorCode.RequestTimedOutError, HttpStatusCode.ServiceUnavailable); } - [Theory] [InlineData(OcelotErrorCode.CannotAddDataError)] [InlineData(OcelotErrorCode.CannotFindDataError)] diff --git a/test/Ocelot.UnitTests/Responder/ResponderMiddlewareTests.cs b/test/Ocelot.UnitTests/Responder/ResponderMiddlewareTests.cs index fb0720b4..28a0707a 100644 --- a/test/Ocelot.UnitTests/Responder/ResponderMiddlewareTests.cs +++ b/test/Ocelot.UnitTests/Responder/ResponderMiddlewareTests.cs @@ -27,7 +27,6 @@ namespace Ocelot.UnitTests.Responder private readonly DownstreamContext _downstreamContext; private OcelotRequestDelegate _next; - public ResponderMiddlewareTests() { _responder = new Mock();