From 8950350e3f68ec5070c9ba33da35c964010df2b5 Mon Sep 17 00:00:00 2001 From: raman-m Date: Wed, 1 Nov 2023 20:40:13 +0300 Subject: [PATCH] Fix StyleCop warnings --- src/Ocelot.Provider.Polly/CircuitBreaker.cs | 2 +- .../Polly/PollyCircuitBreakingDelegatingHandlerTests.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Ocelot.Provider.Polly/CircuitBreaker.cs b/src/Ocelot.Provider.Polly/CircuitBreaker.cs index 4d5a6b9819..21f51df8d5 100644 --- a/src/Ocelot.Provider.Polly/CircuitBreaker.cs +++ b/src/Ocelot.Provider.Polly/CircuitBreaker.cs @@ -7,7 +7,7 @@ public class CircuitBreaker /// Initializes a new instance of the class. /// We expect at least one policy to be passed in, default can't be null. /// - /// the policies with at least a timeout policy + /// The policies with at least a policy. public CircuitBreaker(params IAsyncPolicy[] policies) { var allPolicies = policies.Where(p => p != null).ToArray(); diff --git a/test/Ocelot.UnitTests/Polly/PollyCircuitBreakingDelegatingHandlerTests.cs b/test/Ocelot.UnitTests/Polly/PollyCircuitBreakingDelegatingHandlerTests.cs index e61ddcb8ae..73611356ef 100644 --- a/test/Ocelot.UnitTests/Polly/PollyCircuitBreakingDelegatingHandlerTests.cs +++ b/test/Ocelot.UnitTests/Polly/PollyCircuitBreakingDelegatingHandlerTests.cs @@ -54,6 +54,7 @@ public async void SendAsync_OnePolicy_NoWrapping() .Returns(_pollyQoSProviderMock.Object); _contextAccessorMock.Setup(x => x.HttpContext).Returns(httpContext.Object); + // Act var actual = await InvokeAsync("SendAsync"); @@ -94,7 +95,7 @@ public async void SendAsync_TwoPolicies_HaveWrapped() ShouldBeWrappedBy(policy2, typeof(AsyncPolicy).FullName); } - private DownstreamRoute DownstreamRouteFactory() + private static DownstreamRoute DownstreamRouteFactory() { var options = new QoSOptionsBuilder() .WithTimeoutValue(100) @@ -179,7 +180,7 @@ protected override async Task ImplementationAsync(Func