@@ -37,7 +37,7 @@ public void ShouldThrowIfParserIsNull()
3737 ( ) =>
3838 new ConsulConfigurationProvider ( _consulConfigSourceMock . Object , _consulConfigClientMock . Object ) ;
3939
40- constructing . ShouldThrow < ArgumentNullException > ( )
40+ constructing . Should ( ) . Throw < ArgumentNullException > ( )
4141 . And . Message . Should ( ) . Contain ( nameof ( _consulConfigSourceMock . Object . Parser ) ) ;
4242 }
4343 }
@@ -103,7 +103,7 @@ private void ShouldNotParseIfConfigBytesIsNull()
103103 _consulConfigProvider . Load ( ) ;
104104
105105 Action verifying = ( ) => _configParserMock . Verify ( cp => cp . Parse ( It . IsAny < MemoryStream > ( ) ) , Times . Never ) ;
106- verifying . ShouldNotThrow ( ) ;
106+ verifying . Should ( ) . NotThrow ( ) ;
107107 }
108108
109109 [ Fact ]
@@ -116,7 +116,7 @@ private void ShouldNotThrowExceptionIfOnLoadExceptionIsSetToIgnore()
116116 . Returns ( exceptionContext => { exceptionContext . Ignore = true ; } ) ;
117117
118118 Action loading = ( ) => _consulConfigProvider . Load ( ) ;
119- loading . ShouldNotThrow ( ) ;
119+ loading . Should ( ) . NotThrow ( ) ;
120120 }
121121
122122 [ Theory ]
@@ -191,7 +191,7 @@ private void ShouldThrowExceptionIfOnLoadExceptionDoesNotSetIgnoreWhenExceptionD
191191 . Returns ( exceptionContext => { exceptionContext . Ignore = false ; } ) ;
192192
193193 Action loading = _consulConfigProvider . Invoking ( ccp => ccp . Load ( ) ) ;
194- loading . ShouldThrow < Exception > ( ) . WithMessage ( "Error" ) ;
194+ loading . Should ( ) . Throw < Exception > ( ) . WithMessage ( "Error" ) ;
195195 }
196196
197197 [ Fact ]
@@ -207,7 +207,7 @@ private void ShouldThrowIfConfigDoesNotExistAndIsNotOptonalWhenLoad()
207207 . Returns ( context => context . Ignore = false ) ;
208208
209209 Action loading = _consulConfigProvider . Invoking ( ccp => ccp . Load ( ) ) ;
210- loading . ShouldThrow < Exception > ( )
210+ loading . Should ( ) . Throw < Exception > ( )
211211 . WithMessage ( "The configuration for key Test was not found and is not optional." ) ;
212212 }
213213 }
@@ -268,7 +268,7 @@ private void ShouldNotThrowIfDoesNotExist(bool optional)
268268 . ReturnsAsync ( new QueryResult < KVPair > { StatusCode = HttpStatusCode . NotFound } ) ;
269269
270270 Action reloading = _firstChangeToken . Invoking ( ct => ct . OnReload ( ) ) ;
271- reloading . ShouldNotThrow ( ) ;
271+ reloading . Should ( ) . NotThrow ( ) ;
272272 }
273273
274274 [ Fact ]
@@ -282,7 +282,7 @@ private void ShouldReloadConfigIfReloadOnChangeAndDataInConsulHasChanged()
282282 _firstChangeToken . OnReload ( ) ;
283283
284284 Action verifying = ( ) => _consulConfigClientMock . Verify ( ccc => ccc . GetConfig ( ) , Times . Once ) ;
285- verifying . ShouldNotThrow ( ) ;
285+ verifying . Should ( ) . NotThrow ( ) ;
286286 }
287287
288288 [ Fact ]
@@ -293,7 +293,7 @@ private void ShouldWatchForChangesIfSourceReloadOnChangesIsTrue()
293293 _consulConfigClientMock . Verify (
294294 ccs => ccs . Watch ( _consulConfigSourceMock . Object . OnWatchException ) ,
295295 Times . Once ) ;
296- verifying . ShouldNotThrow ( ) ;
296+ verifying . Should ( ) . NotThrow ( ) ;
297297 }
298298 }
299299 }
0 commit comments