@@ -455,15 +455,6 @@ public void CanSetAndGetMultipleSearchPaths()
455
455
[ Fact ]
456
456
public void CanResetSearchPaths ( )
457
457
{
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
-
467
458
// record the default search path
468
459
GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
469
460
var oldPaths = GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ;
@@ -472,19 +463,13 @@ public void CanResetSearchPaths()
472
463
// generate a non-default path to set
473
464
var newPaths = new string [ ] { Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) } ;
474
465
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 ) ) ;
485
469
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 ) ) ;
488
473
}
489
474
490
475
[ Fact ]
0 commit comments