Skip to content

Commit 0462a4d

Browse files
committed
fix some nullables in tests
1 parent d4e7dec commit 0462a4d

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void Should_throw_when_maxQueuingActions_less_than_zero()
4141
public void Should_throw_when_onBulkheadRejected_is_null()
4242
{
4343
Action policy = () => Policy
44-
.BulkheadAsync(1, 0, null);
44+
.BulkheadAsync(1, 0, null!);
4545

4646
policy.Should().Throw<ArgumentNullException>().And
4747
.ParamName.Should().Be("onBulkheadRejectedAsync");

src/Polly.Specs/Bulkhead/BulkheadSpecs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void Should_throw_when_maxqueuedactions_less_than_zero()
3939
public void Should_throw_when_onBulkheadRejected_is_null()
4040
{
4141
Action policy = () => Policy
42-
.Bulkhead(1, 0, null);
42+
.Bulkhead(1, 0, null!);
4343

4444
policy.Should().Throw<ArgumentNullException>().And
4545
.ParamName.Should().Be("onBulkheadRejected");

src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void Should_throw_when_maxQueuingActions_less_than_zero()
4242
public void Should_throw_when_onBulkheadRejected_is_null()
4343
{
4444
Action policy = () => Policy
45-
.BulkheadAsync<int>(1, 0, null);
45+
.BulkheadAsync<int>(1, 0, null!);
4646

4747
policy.Should().Throw<ArgumentNullException>().And
4848
.ParamName.Should().Be("onBulkheadRejectedAsync");

src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void Should_throw_when_maxQueuingActions_less_than_zero()
4242
public void Should_throw_when_onBulkheadRejected_is_null()
4343
{
4444
Action policy = () => Policy
45-
.Bulkhead<int>(1, 0, null);
45+
.Bulkhead<int>(1, 0, null!);
4646

4747
policy.Should().Throw<ArgumentNullException>().And
4848
.ParamName.Should().Be("onBulkheadRejected");

src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal static TResult Implementation<TResult>(
2727
}
2828
catch (Exception ex)
2929
{
30-
Exception handledException = shouldHandleExceptionPredicates.FirstMatchOrDefault(ex);
30+
Exception? handledException = shouldHandleExceptionPredicates.FirstMatchOrDefault(ex);
3131
if (handledException == null)
3232
{
3333
throw;

src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal static async Task<TResult> ImplementationAsync<TResult>(
2929
}
3030
catch (Exception ex)
3131
{
32-
Exception handledException = shouldHandleExceptionPredicates.FirstMatchOrDefault(ex);
32+
Exception? handledException = shouldHandleExceptionPredicates.FirstMatchOrDefault(ex);
3333
if (handledException == null)
3434
{
3535
throw;

0 commit comments

Comments
 (0)