Skip to content

Commit e566ea9

Browse files
Fix ShouldThrow syntax errors in specs
1 parent f232595 commit e566ea9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,47 +57,47 @@ public void Syntax_should_throw_for_perTimeSpan_zero()
5757
{
5858
Action invalidSyntax = () => GetPolicyViaSyntax(1, TimeSpan.Zero);
5959

60-
invalidSyntax.ShouldThrow<ArgumentOutOfRangeException>().And.ParamName.Should().Be("perTimeSpan");
60+
invalidSyntax.Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("perTimeSpan");
6161
}
6262

6363
[Fact]
6464
public void Syntax_should_throw_for_numberOfExecutions_negative()
6565
{
6666
Action invalidSyntax = () => GetPolicyViaSyntax(-1, TimeSpan.FromSeconds(1));
6767

68-
invalidSyntax.ShouldThrow<ArgumentOutOfRangeException>().And.ParamName.Should().Be("numberOfExecutions");
68+
invalidSyntax.Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("numberOfExecutions");
6969
}
7070

7171
[Fact]
7272
public void Syntax_should_throw_for_numberOfExecutions_zero()
7373
{
7474
Action invalidSyntax = () => GetPolicyViaSyntax(0, TimeSpan.FromSeconds(1));
7575

76-
invalidSyntax.ShouldThrow<ArgumentOutOfRangeException>().And.ParamName.Should().Be("numberOfExecutions");
76+
invalidSyntax.Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("numberOfExecutions");
7777
}
7878

7979
[Fact]
8080
public void Syntax_should_throw_for_perTimeSpan_negative()
8181
{
8282
Action invalidSyntax = () => GetPolicyViaSyntax(1, TimeSpan.FromTicks(-1));
8383

84-
invalidSyntax.ShouldThrow<ArgumentOutOfRangeException>().And.ParamName.Should().Be("perTimeSpan");
84+
invalidSyntax.Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("perTimeSpan");
8585
}
8686

8787
[Fact]
8888
public void Syntax_should_throw_for_maxBurst_negative()
8989
{
9090
Action invalidSyntax = () => GetPolicyViaSyntax(1, TimeSpan.FromSeconds(1), -1);
9191

92-
invalidSyntax.ShouldThrow<ArgumentOutOfRangeException>().And.ParamName.Should().Be("maxBurst");
92+
invalidSyntax.Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("maxBurst");
9393
}
9494

9595
[Fact]
9696
public void Syntax_should_throw_for_maxBurst_zero()
9797
{
9898
Action invalidSyntax = () => GetPolicyViaSyntax(1, TimeSpan.FromSeconds(1), 0);
9999

100-
invalidSyntax.ShouldThrow<ArgumentOutOfRangeException>().And.ParamName.Should().Be("maxBurst");
100+
invalidSyntax.Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("maxBurst");
101101
}
102102

103103
[Theory]

0 commit comments

Comments
 (0)