diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs index c3b7d8e0d49..94b225d2083 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs @@ -343,7 +343,7 @@ public async Task Double_generic_SerializingCacheProvider_should_not_deserialize cacheHit.Should().BeFalse(); deserializeInvoked.Should().BeFalse(); - fromCache.Should().Be(default(ResultPrimitive)); + fromCache.Should().Be(default); } [Fact] @@ -437,7 +437,7 @@ public async Task Double_generic_SerializingCacheProvider_from_extension_syntax_ cacheHit.Should().BeFalse(); deserializeInvoked.Should().BeFalse(); - fromCache.Should().Be(default(ResultPrimitive)); + fromCache.Should().Be(default); } #endregion diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs index 5004d77946d..43cca91688d 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs @@ -343,7 +343,7 @@ public void Double_generic_SerializingCacheProvider_should_not_deserialize_on_ge cacheHit.Should().BeFalse(); deserializeInvoked.Should().BeFalse(); - fromCache.Should().Be(default(ResultPrimitive)); + fromCache.Should().Be(default); } [Fact] @@ -439,7 +439,7 @@ public void Double_generic_SerializingCacheProvider_from_extension_syntax_should cacheHit.Should().BeFalse(); deserializeInvoked.Should().BeFalse(); - fromCache.Should().Be(default(ResultPrimitive)); + fromCache.Should().Be(default); } #endregion diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs index 13a9656e754..9dc098e96fe 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs @@ -1306,7 +1306,7 @@ public void Should_initialise_LastHandledResult_and_LastResult_to_default_on_cre .HandleResult(ResultPrimitive.Fault) .CircuitBreakerAsync(2, TimeSpan.FromMinutes(1)); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeNull(); } @@ -1366,7 +1366,7 @@ public async Task Should_set_LastHandledResult_to_default_on_circuit_reset() breaker.Reset(); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeNull(); } diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs index 071dab2b0c3..e8b481a0a83 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs @@ -480,7 +480,7 @@ public void Should_initialise_LastHandledResult_and_LastResult_to_default_on_cre .OrResult(ResultPrimitive.Fault) .CircuitBreaker(2, TimeSpan.FromMinutes(1)); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeNull(); } @@ -514,7 +514,7 @@ public void Should_set_LastException_on_exception_even_when_not_breaking() breaker.CircuitState.Should().Be(CircuitState.Closed); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeOfType(); } @@ -554,7 +554,7 @@ public void Should_set_LastException_to_last_exception_when_breaking() breaker.CircuitState.Should().Be(CircuitState.Open); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeOfType(); } @@ -579,7 +579,7 @@ public void Should_set_LastHandledResult_and_LastException_to_default_on_circuit breaker.Reset(); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeNull(); } diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs index e2b6a60ef2f..00fd500747d 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs @@ -1296,7 +1296,7 @@ public void Should_initialise_LastHandledResult_and_LastResult_to_default_on_cre .HandleResult(ResultPrimitive.Fault) .CircuitBreaker(2, TimeSpan.FromMinutes(1)); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeNull(); } @@ -1355,7 +1355,7 @@ public void Should_set_LastHandledResult_to_default_on_circuit_reset() breaker.Reset(); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); breaker.LastException.Should().BeNull(); } diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs index 1c124ed82f0..c9d8b345a01 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs @@ -9,6 +9,6 @@ public void Should_be_able_to_use_LastHandledResult_via_interface() .HandleResult(ResultPrimitive.Fault) .CircuitBreaker(2, TimeSpan.FromMinutes(1)); - breaker.LastHandledResult.Should().Be(default(ResultPrimitive)); + breaker.LastHandledResult.Should().Be(default); } } diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs index b4be095ea3f..d37d225751d 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs @@ -556,7 +556,7 @@ public void Outermost_generic_policy_not_handling_result_even_if_inner_policies_ PolicyResult executeAndCaptureResultOnPolicyWrap = wrap.ExecuteAndCapture(() => ResultPrimitive.FaultAgain); executeAndCaptureResultOnPolicyWrap.Outcome.Should().Be(OutcomeType.Successful); - executeAndCaptureResultOnPolicyWrap.FinalHandledResult.Should().Be(default(ResultPrimitive)); + executeAndCaptureResultOnPolicyWrap.FinalHandledResult.Should().Be(default); executeAndCaptureResultOnPolicyWrap.FaultType.Should().BeNull(); executeAndCaptureResultOnPolicyWrap.FinalException.Should().BeNull(); executeAndCaptureResultOnPolicyWrap.ExceptionType.Should().BeNull(); diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs index b73c55a75ea..4ec0d5be2a8 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs @@ -557,7 +557,7 @@ public async Task Outermost_generic_policy_not_handling_result_even_if_inner_pol PolicyResult executeAndCaptureResultOnPolicyWrap = await wrap.ExecuteAndCaptureAsync(() => Task.FromResult(ResultPrimitive.FaultAgain)); executeAndCaptureResultOnPolicyWrap.Outcome.Should().Be(OutcomeType.Successful); - executeAndCaptureResultOnPolicyWrap.FinalHandledResult.Should().Be(default(ResultPrimitive)); + executeAndCaptureResultOnPolicyWrap.FinalHandledResult.Should().Be(default); executeAndCaptureResultOnPolicyWrap.FaultType.Should().BeNull(); executeAndCaptureResultOnPolicyWrap.FinalException.Should().BeNull(); executeAndCaptureResultOnPolicyWrap.ExceptionType.Should().BeNull();