From 030c162d1fec2e14cf3a3ecc1aac3a5117fef671 Mon Sep 17 00:00:00 2001 From: sukreshmanda Date: Tue, 30 Jul 2024 21:32:54 +0530 Subject: [PATCH] Use static global using for DictionaryHelpers --- .../CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs | 3 +-- test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs | 3 +-- test/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs | 3 +-- .../CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs | 3 +-- test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs | 3 +-- test/Polly.Specs/Fallback/FallbackAsyncSpecs.cs | 3 +-- test/Polly.Specs/Fallback/FallbackSpecs.cs | 3 +-- test/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs | 3 +-- test/Polly.Specs/Fallback/FallbackTResultSpecs.cs | 3 +-- test/Polly.Specs/Polly.Specs.csproj | 2 +- test/Polly.Specs/Retry/RetryAsyncSpecs.cs | 3 +-- test/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs | 3 +-- test/Polly.Specs/Retry/RetryTResultAsyncSpecs.cs | 3 +-- test/Polly.Specs/Retry/RetryTResultSpecs.cs | 3 +-- test/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs | 3 +-- test/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs | 3 +-- 16 files changed, 16 insertions(+), 31 deletions(-) diff --git a/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs b/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs index e84ee2f02c4..a44849d0904 100644 --- a/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs +++ b/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs b/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs index 079cdb37939..db3ddcf8c1c 100644 --- a/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs +++ b/test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/test/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs b/test/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs index 3b78cfd3399..8eb173ec0ef 100644 --- a/test/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs +++ b/test/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs b/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs index 8266bd67467..c48f9ffd756 100644 --- a/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs +++ b/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs b/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs index 77a6b80b711..0464f4ff57d 100644 --- a/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs +++ b/test/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/test/Polly.Specs/Fallback/FallbackAsyncSpecs.cs b/test/Polly.Specs/Fallback/FallbackAsyncSpecs.cs index 9a7dcf188db..df724354f8d 100644 --- a/test/Polly.Specs/Fallback/FallbackAsyncSpecs.cs +++ b/test/Polly.Specs/Fallback/FallbackAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/test/Polly.Specs/Fallback/FallbackSpecs.cs b/test/Polly.Specs/Fallback/FallbackSpecs.cs index 67f18272133..de3b5ea4955 100644 --- a/test/Polly.Specs/Fallback/FallbackSpecs.cs +++ b/test/Polly.Specs/Fallback/FallbackSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/test/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs b/test/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs index 917c34ab5a4..a06431b0e92 100644 --- a/test/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs +++ b/test/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/test/Polly.Specs/Fallback/FallbackTResultSpecs.cs b/test/Polly.Specs/Fallback/FallbackTResultSpecs.cs index 5a9b55120de..6f51dd02bcd 100644 --- a/test/Polly.Specs/Fallback/FallbackTResultSpecs.cs +++ b/test/Polly.Specs/Fallback/FallbackTResultSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/test/Polly.Specs/Polly.Specs.csproj b/test/Polly.Specs/Polly.Specs.csproj index 8cfc89e1e0b..6550cca3845 100644 --- a/test/Polly.Specs/Polly.Specs.csproj +++ b/test/Polly.Specs/Polly.Specs.csproj @@ -18,6 +18,7 @@ + @@ -27,7 +28,6 @@ - diff --git a/test/Polly.Specs/Retry/RetryAsyncSpecs.cs b/test/Polly.Specs/Retry/RetryAsyncSpecs.cs index 953e2c43377..4cca60d4e35 100644 --- a/test/Polly.Specs/Retry/RetryAsyncSpecs.cs +++ b/test/Polly.Specs/Retry/RetryAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/test/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs b/test/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs index 7138f2e7726..7c45c04293b 100644 --- a/test/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs +++ b/test/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/test/Polly.Specs/Retry/RetryTResultAsyncSpecs.cs b/test/Polly.Specs/Retry/RetryTResultAsyncSpecs.cs index 9c7f4745c94..863ea0b0149 100644 --- a/test/Polly.Specs/Retry/RetryTResultAsyncSpecs.cs +++ b/test/Polly.Specs/Retry/RetryTResultAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/test/Polly.Specs/Retry/RetryTResultSpecs.cs b/test/Polly.Specs/Retry/RetryTResultSpecs.cs index aac8b2f918c..1b9a1a99b56 100644 --- a/test/Polly.Specs/Retry/RetryTResultSpecs.cs +++ b/test/Polly.Specs/Retry/RetryTResultSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/test/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs b/test/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs index 01bd7382ac7..9634a3eb186 100644 --- a/test/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs +++ b/test/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/test/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs b/test/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs index 7edbbf3b22e..e63fbf62870 100644 --- a/test/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs +++ b/test/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs @@ -1,5 +1,4 @@ -using static Polly.Specs.DictionaryHelpers; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry;