Skip to content

Commit

Permalink
Fix S3878 (#2251)
Browse files Browse the repository at this point in the history
Fix S3878 warning.
  • Loading branch information
sukreshmanda authored Jul 29, 2024
1 parent 2ffa02e commit 4b3b78f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/Polly.Specs/Wrap/PolicyWrapSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ public void Wrapping_nothing_using_static_wrap_syntax_should_throw()
public void Wrapping_only_one_policy_using_static_wrap_syntax_should_throw()
{
Policy singlePolicy = Policy.Handle<Exception>().Retry();
var policies = new[] { singlePolicy };

#pragma warning disable S3878 // Remove this array creation and simply pass the elements
Action config = () => Policy.Wrap(new[] { singlePolicy });
#pragma warning restore S3878
Action config = () => Policy.Wrap(policies);

config.Should().Throw<ArgumentException>().And.ParamName.Should().Be("policies");
}
Expand Down

0 comments on commit 4b3b78f

Please sign in to comment.