@@ -526,13 +526,13 @@ public void CheckoutRetainsUntrackedChanges()
526526 string fullPathFileB = Touch ( repo . Info . WorkingDirectory , "b.txt" , alternateFileContent ) ;
527527
528528 // Verify that there is an untracked entry.
529- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Untracked . Count ( ) ) ;
529+ Assert . Single ( repo . RetrieveStatus ( ) . Untracked ) ;
530530 Assert . Equal ( FileStatus . NewInWorkdir , repo . RetrieveStatus ( fullPathFileB ) ) ;
531531
532532 Commands . Checkout ( repo , otherBranchName ) ;
533533
534534 // Verify untracked entry still exists.
535- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Untracked . Count ( ) ) ;
535+ Assert . Single ( repo . RetrieveStatus ( ) . Untracked ) ;
536536 Assert . Equal ( FileStatus . NewInWorkdir , repo . RetrieveStatus ( fullPathFileB ) ) ;
537537 }
538538 }
@@ -550,13 +550,13 @@ public void ForceCheckoutRetainsUntrackedChanges()
550550 string fullPathFileB = Touch ( repo . Info . WorkingDirectory , "b.txt" , alternateFileContent ) ;
551551
552552 // Verify that there is an untracked entry.
553- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Untracked . Count ( ) ) ;
553+ Assert . Single ( repo . RetrieveStatus ( ) . Untracked ) ;
554554 Assert . Equal ( FileStatus . NewInWorkdir , repo . RetrieveStatus ( fullPathFileB ) ) ;
555555
556556 Commands . Checkout ( repo , otherBranchName , new CheckoutOptions ( ) { CheckoutModifiers = CheckoutModifiers . Force } ) ;
557557
558558 // Verify untracked entry still exists.
559- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Untracked . Count ( ) ) ;
559+ Assert . Single ( repo . RetrieveStatus ( ) . Untracked ) ;
560560 Assert . Equal ( FileStatus . NewInWorkdir , repo . RetrieveStatus ( fullPathFileB ) ) ;
561561 }
562562 }
@@ -574,13 +574,13 @@ public void CheckoutRetainsUnstagedChanges()
574574 string fullPathFileA = Touch ( repo . Info . WorkingDirectory , originalFilePath , alternateFileContent ) ;
575575
576576 // Verify that there is a modified entry.
577- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Modified . Count ( ) ) ;
577+ Assert . Single ( repo . RetrieveStatus ( ) . Modified ) ;
578578 Assert . Equal ( FileStatus . ModifiedInWorkdir , repo . RetrieveStatus ( fullPathFileA ) ) ;
579579
580580 Commands . Checkout ( repo , otherBranchName ) ;
581581
582582 // Verify modified entry still exists.
583- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Modified . Count ( ) ) ;
583+ Assert . Single ( repo . RetrieveStatus ( ) . Modified ) ;
584584 Assert . Equal ( FileStatus . ModifiedInWorkdir , repo . RetrieveStatus ( fullPathFileA ) ) ;
585585 }
586586 }
@@ -599,13 +599,13 @@ public void CheckoutRetainsStagedChanges()
599599 Commands . Stage ( repo , fullPathFileA ) ;
600600
601601 // Verify that there is a staged entry.
602- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Staged . Count ( ) ) ;
602+ Assert . Single ( repo . RetrieveStatus ( ) . Staged ) ;
603603 Assert . Equal ( FileStatus . ModifiedInIndex , repo . RetrieveStatus ( fullPathFileA ) ) ;
604604
605605 Commands . Checkout ( repo , otherBranchName ) ;
606606
607607 // Verify staged entry still exists.
608- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Staged . Count ( ) ) ;
608+ Assert . Single ( repo . RetrieveStatus ( ) . Staged ) ;
609609 Assert . Equal ( FileStatus . ModifiedInIndex , repo . RetrieveStatus ( fullPathFileA ) ) ;
610610 }
611611 }
@@ -625,7 +625,7 @@ public void CheckoutRetainsIgnoredChanges()
625625 "bin/some_ignored_file.txt" ,
626626 "hello from this ignored file." ) ;
627627
628- Assert . Equal ( 1 , repo . RetrieveStatus ( new StatusOptions { IncludeIgnored = true } ) . Ignored . Count ( ) ) ;
628+ Assert . Single ( repo . RetrieveStatus ( new StatusOptions { IncludeIgnored = true } ) . Ignored ) ;
629629
630630 Assert . Equal ( FileStatus . Ignored , repo . RetrieveStatus ( ignoredFilePath ) ) ;
631631
@@ -652,7 +652,7 @@ public void ForceCheckoutRetainsIgnoredChanges()
652652 "bin/some_ignored_file.txt" ,
653653 "hello from this ignored file." ) ;
654654
655- Assert . Equal ( 1 , repo . RetrieveStatus ( new StatusOptions { IncludeIgnored = true } ) . Ignored . Count ( ) ) ;
655+ Assert . Single ( repo . RetrieveStatus ( new StatusOptions { IncludeIgnored = true } ) . Ignored ) ;
656656
657657 Assert . Equal ( FileStatus . Ignored , repo . RetrieveStatus ( ignoredFilePath ) ) ;
658658
@@ -958,7 +958,7 @@ public void CanCheckoutPath(string originalBranch, string checkoutFrom, string p
958958 repo . CheckoutPaths ( checkoutFrom , new [ ] { path } ) ;
959959
960960 Assert . Equal ( expectedStatus , repo . RetrieveStatus ( path ) ) ;
961- Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Count ( ) ) ;
961+ Assert . Single ( repo . RetrieveStatus ( ) ) ;
962962 }
963963 }
964964
@@ -995,8 +995,7 @@ public void CannotCheckoutPathsWithEmptyOrNullPathArgument()
995995 Assert . False ( repo . RetrieveStatus ( ) . IsDirty ) ;
996996
997997 // Passing null 'paths' parameter should throw
998- Assert . Throws ( typeof ( ArgumentNullException ) ,
999- ( ) => repo . CheckoutPaths ( "i-do-numbers" , null ) ) ;
998+ Assert . Throws < ArgumentNullException > ( ( ) => repo . CheckoutPaths ( "i-do-numbers" , null ) ) ;
1000999
10011000 // Passing empty list should do nothing
10021001 repo . CheckoutPaths ( "i-do-numbers" , Enumerable . Empty < string > ( ) ) ;
0 commit comments