File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
tests/SendGrid.Tests/Reliability Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ public int RetryCount
3636 throw new ArgumentException ( "Retry count must be greater than zero" ) ;
3737 }
3838
39+ if ( value > 5 )
40+ {
41+ throw new ArgumentException ( "Retry count must be less than 5" ) ;
42+ }
43+
3944 retryCount = value ;
4045 }
4146 }
Original file line number Diff line number Diff line change @@ -100,6 +100,14 @@ public void ReliabilitySettingsShouldNotAllowNegativeRetryCount()
100100 Assert . Throws < ArgumentException > ( ( ) => settings . RetryCount = - 1 ) ;
101101 }
102102
103+ [ Fact ]
104+ public void ReliabilitySettingsShouldNotAllowRetryCountGreaterThan5 ( )
105+ {
106+ var settings = new ReliabilitySettings ( ) ;
107+
108+ Assert . Throws < ArgumentException > ( ( ) => settings . RetryCount = 6 ) ;
109+ }
110+
103111 [ Fact ]
104112 public void ReliabilitySettingsShouldNotAllowRetryIntervalGreaterThan30Seconds ( )
105113 {
You can’t perform that action at this time.
0 commit comments