44using System . Linq ;
55using LibGit2Sharp . Tests . TestHelpers ;
66using Xunit ;
7- using Xunit . Extensions ;
87
98namespace LibGit2Sharp . Tests
109{
@@ -56,9 +55,7 @@ public void CanAddAndReadMultivarFromTheLocalConfiguration()
5655 string path = SandboxStandardTestRepo ( ) ;
5756 using ( var repo = new Repository ( path ) )
5857 {
59- Assert . Empty ( repo . Config
60- . OfType < ConfigurationEntry < string > > ( )
61- . Where ( x => x . Key == "unittests.plugin" ) ) ;
58+ Assert . DoesNotContain ( repo . Config . OfType < ConfigurationEntry < string > > ( ) , x => x . Key == "unittests.plugin" ) ;
6259
6360 repo . Config . Add ( "unittests.plugin" , "value1" , ConfigurationLevel . Local ) ;
6461 repo . Config . Add ( "unittests.plugin" , "value2" , ConfigurationLevel . Local ) ;
@@ -78,9 +75,7 @@ public void CanAddAndReadMultivarFromTheGlobalConfiguration()
7875 using ( var repo = new Repository ( path ) )
7976 {
8077 Assert . True ( repo . Config . HasConfig ( ConfigurationLevel . Global ) ) ;
81- Assert . Empty ( repo . Config
82- . OfType < ConfigurationEntry < string > > ( )
83- . Where ( x => x . Key == "unittests.plugin" ) ) ;
78+ Assert . DoesNotContain ( repo . Config . OfType < ConfigurationEntry < string > > ( ) , x => x . Key == "unittests.plugin" ) ;
8479
8580 repo . Config . Add ( "unittests.plugin" , "value1" , ConfigurationLevel . Global ) ;
8681 repo . Config . Add ( "unittests.plugin" , "value2" , ConfigurationLevel . Global ) ;
@@ -157,9 +152,7 @@ public void CanUnsetAllFromTheLocalConfiguration()
157152
158153 repo . Config . UnsetAll ( "unittests.plugin" ) ;
159154
160- Assert . Empty ( repo . Config
161- . OfType < ConfigurationEntry < string > > ( )
162- . Where ( x => x . Key == "unittests.plugin" ) ) ;
155+ Assert . DoesNotContain ( repo . Config . OfType < ConfigurationEntry < string > > ( ) , x => x . Key == "unittests.plugin" ) ;
163156 }
164157 }
165158
@@ -531,20 +524,20 @@ public void CanSetAndGetSearchPath()
531524 {
532525 string globalPath = Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) ;
533526 string systemPath = Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) ;
534- string xdgPath = Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) ;
527+ string xdgPath = Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) ;
535528
536529 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , globalPath ) ;
537530 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . System , systemPath ) ;
538- GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Xdg , xdgPath ) ;
531+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Xdg , xdgPath ) ;
539532
540533 Assert . Equal ( globalPath , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) . Single ( ) ) ;
541534 Assert . Equal ( systemPath , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . System ) . Single ( ) ) ;
542- Assert . Equal ( xdgPath , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Xdg ) . Single ( ) ) ;
535+ Assert . Equal ( xdgPath , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Xdg ) . Single ( ) ) ;
543536
544537 // reset the search paths to their defaults
545538 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
546539 GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . System , null ) ;
547- GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Xdg , null ) ;
540+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Xdg , null ) ;
548541 }
549542
550543 [ Fact ]
@@ -577,12 +570,12 @@ public void CanResetSearchPaths()
577570 var newPaths = new string [ ] { Path . Combine ( Constants . TemporaryReposPath , Path . GetRandomFileName ( ) ) } ;
578571
579572 // change to the non-default path
580- GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , newPaths ) ;
581- Assert . Equal ( newPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
573+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , newPaths ) ;
574+ Assert . Equal ( newPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
582575
583576 // set it back to the default
584- GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
585- Assert . Equal ( oldPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
577+ GlobalSettings . SetConfigSearchPaths ( ConfigurationLevel . Global , null ) ;
578+ Assert . Equal ( oldPaths , GlobalSettings . GetConfigSearchPaths ( ConfigurationLevel . Global ) ) ;
586579 }
587580
588581 [ Fact ]
0 commit comments