Skip to content

Commit c8c1890

Browse files
authored
Fix S3717 (#1965)
1 parent 2ad40a8 commit c8c1890

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

test/Polly.Specs/Polly.Specs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Include>[Polly]*</Include>
1010
<IncludePollyUsings>true</IncludePollyUsings>
1111
<NoWarn>$(NoWarn);S103;S104;IDE0011;SA1600;SA1204;CA2008;CA2201;</NoWarn>
12-
<NoWarn>$(NoWarn);S3878;CA1030;S3717;S1402;SA1649;SA1402;CA1031</NoWarn>
12+
<NoWarn>$(NoWarn);S3878;CA1030;S1402;SA1649;SA1402;CA1031</NoWarn>
1313
<NoWarn>$(NoWarn);S2184;</NoWarn>
1414
</PropertyGroup>
1515

test/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public async Task Should_rethrow_exception_from_inside_delegate__pessimistic()
247247
{
248248
var policy = Policy.TimeoutAsync(TimeSpan.FromSeconds(10), TimeoutStrategy.Pessimistic);
249249

250-
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotImplementedException())).Should().ThrowAsync<NotImplementedException>();
250+
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotSupportedException())).Should().ThrowAsync<NotSupportedException>();
251251
}
252252

253253
[Fact]
@@ -340,7 +340,7 @@ public async Task Should_rethrow_exception_from_inside_delegate__optimistic()
340340
{
341341
var policy = Policy.TimeoutAsync(TimeSpan.FromSeconds(10), TimeoutStrategy.Optimistic);
342342

343-
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotImplementedException())).Should().ThrowAsync<NotImplementedException>();
343+
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotSupportedException())).Should().ThrowAsync<NotSupportedException>();
344344
}
345345

346346
#endregion

test/Polly.Specs/Timeout/TimeoutSpecs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public void Should_rethrow_exception_from_inside_delegate__pessimistic()
259259
{
260260
var policy = Policy.Timeout(TimeSpan.FromSeconds(10), TimeoutStrategy.Pessimistic);
261261

262-
policy.Invoking(p => p.Execute(() => throw new NotImplementedException())).Should().Throw<NotImplementedException>();
262+
policy.Invoking(p => p.Execute(() => throw new NotSupportedException())).Should().Throw<NotSupportedException>();
263263
}
264264

265265
[Fact]
@@ -401,7 +401,7 @@ public void Should_rethrow_exception_from_inside_delegate__optimistic()
401401
{
402402
var policy = Policy.Timeout(TimeSpan.FromSeconds(10), TimeoutStrategy.Optimistic);
403403

404-
policy.Invoking(p => p.Execute(() => throw new NotImplementedException())).Should().Throw<NotImplementedException>();
404+
policy.Invoking(p => p.Execute(() => throw new NotSupportedException())).Should().Throw<NotSupportedException>();
405405

406406
}
407407

test/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public async Task Should_rethrow_exception_from_inside_delegate__pessimistic()
242242
{
243243
var policy = Policy.TimeoutAsync<ResultPrimitive>(TimeSpan.FromSeconds(10), TimeoutStrategy.Pessimistic);
244244

245-
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotImplementedException())).Should().ThrowAsync<NotImplementedException>();
245+
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotSupportedException())).Should().ThrowAsync<NotSupportedException>();
246246
}
247247

248248
#endregion
@@ -304,7 +304,7 @@ public async Task Should_rethrow_exception_from_inside_delegate__optimistic()
304304
{
305305
var policy = Policy.TimeoutAsync<ResultPrimitive>(TimeSpan.FromSeconds(10), TimeoutStrategy.Optimistic);
306306

307-
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotImplementedException())).Should().ThrowAsync<NotImplementedException>();
307+
await policy.Awaiting(p => p.ExecuteAsync(() => throw new NotSupportedException())).Should().ThrowAsync<NotSupportedException>();
308308
}
309309

310310
#endregion

test/Polly.Specs/Timeout/TimeoutTResultSpecs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public void Should_rethrow_exception_from_inside_delegate__pessimistic()
250250
{
251251
var policy = Policy.Timeout<ResultPrimitive>(TimeSpan.FromSeconds(10), TimeoutStrategy.Pessimistic);
252252

253-
policy.Invoking(p => p.Execute(() => throw new NotImplementedException())).Should().Throw<NotImplementedException>();
253+
policy.Invoking(p => p.Execute(() => throw new NotSupportedException())).Should().Throw<NotSupportedException>();
254254
}
255255

256256
[Fact]
@@ -402,7 +402,7 @@ public void Should_rethrow_exception_from_inside_delegate__optimistic()
402402
{
403403
var policy = Policy.Timeout<ResultPrimitive>(TimeSpan.FromSeconds(10), TimeoutStrategy.Optimistic);
404404

405-
policy.Invoking(p => p.Execute(() => throw new NotImplementedException())).Should().Throw<NotImplementedException>();
405+
policy.Invoking(p => p.Execute(() => throw new NotSupportedException())).Should().Throw<NotSupportedException>();
406406
}
407407

408408
#endregion

0 commit comments

Comments
 (0)