@@ -455,15 +455,6 @@ public void CanSetAndGetMultipleSearchPaths()
455455 [ Fact ]
456456 public void CanResetSearchPaths ( )
457457 {
458- // all of these calls should reset the config path to the default
459- Action [ ] resetActions =
460- {
461- ( ) => GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global ) ,
462- ( ) => GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ,
463- ( ) => GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , string . Empty ) ,
464- ( ) => GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , new string [ ] { } ) ,
465- } ;
466-
467458 // record the default search path
468459 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
469460 var oldPaths = GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ;
@@ -472,19 +463,13 @@ public void CanResetSearchPaths()
472463 // generate a non-default path to set
473464 var newPaths = new string [ ] { Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) } ;
474465
475- foreach ( var tryToReset in resetActions )
476- {
477- // change to the non-default path
478- GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , newPaths ) ;
479- Assert . Equal ( newPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
480-
481- // set it back to the default
482- tryToReset ( ) ;
483- Assert . Equal ( oldPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
484- }
466+ // change to the non-default path
467+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , newPaths ) ;
468+ Assert . Equal ( newPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
485469
486- // make sure the config paths are reset after the test ends
487- GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
470+ // set it back to the default
471+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
472+ Assert . Equal ( oldPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
488473 }
489474
490475 [ Fact ]
0 commit comments