@@ -755,67 +755,5 @@ public async Task ShouldDetectGitFetch()
755
755
EndTest ( logger ) ;
756
756
}
757
757
}
758
-
759
-
760
-
761
- [ Test ]
762
- public async Task ShouldCheckoutFiles ( )
763
- {
764
- await Initialize ( TestRepoMasterCleanSynchronized ) ;
765
-
766
- var repositoryManagerListener = Substitute . For < IRepositoryManagerListener > ( ) ;
767
- repositoryManagerListener . AttachListener ( RepositoryManager , repositoryManagerEvents ) ;
768
-
769
- var expected = new GitStatus
770
- {
771
- Behind = 1 ,
772
- LocalBranch = "master" ,
773
- RemoteBranch = "origin/master" ,
774
- Entries =
775
- new List < GitStatusEntry > {
776
- new GitStatusEntry ( "foobar.txt" , TestRepoMasterCleanSynchronized . Combine ( "foobar.txt" ) ,
777
- "foobar.txt" , GitFileStatus . Untracked )
778
- }
779
- } ;
780
-
781
- var result = new GitStatus ( ) ;
782
- Environment . Repository . OnStatusUpdated += status => { result = status ; } ;
783
-
784
- var foobarTxt = TestRepoMasterCleanSynchronized . Combine ( "foobar.txt" ) ;
785
- foobarTxt . WriteAllText ( "foobar" ) ;
786
-
787
- await TaskManager . Wait ( ) ;
788
- RepositoryManager . WaitForEvents ( ) ;
789
- WaitForNotBusy ( repositoryManagerEvents , 1 ) ;
790
-
791
- repositoryManagerListener . Received ( ) . OnStatusUpdate ( Args . GitStatus ) ;
792
- repositoryManagerListener . DidNotReceive ( ) . OnActiveBranchChanged ( Arg . Any < ConfigBranch ? > ( ) ) ;
793
- repositoryManagerListener . DidNotReceive ( ) . OnActiveRemoteChanged ( Arg . Any < ConfigRemote ? > ( ) ) ;
794
- repositoryManagerListener . DidNotReceive ( ) . OnLocalBranchListChanged ( ) ;
795
- repositoryManagerListener . DidNotReceive ( ) . OnRemoteBranchListChanged ( ) ;
796
- repositoryManagerListener . Received ( ) . OnIsBusyChanged ( Args . Bool ) ;
797
- repositoryManagerListener . DidNotReceive ( ) . OnLocksUpdated ( Args . EnumerableGitLock ) ;
798
-
799
- await RepositoryManager . CheckoutFiles ( new List < string > ( ) { "foobar.txt" } )
800
- . StartAsAsync ( ) ;
801
-
802
- await TaskManager . Wait ( ) ;
803
- RepositoryManager . WaitForEvents ( ) ;
804
- WaitForNotBusy ( repositoryManagerEvents , 1 ) ;
805
- repositoryManagerEvents . OnStatusUpdate . WaitOne ( TimeSpan . FromSeconds ( 1 ) ) ;
806
-
807
- repositoryManagerListener . Received ( ) . OnStatusUpdate ( Args . GitStatus ) ;
808
- repositoryManagerListener . DidNotReceive ( ) . OnActiveBranchChanged ( Arg . Any < ConfigBranch ? > ( ) ) ;
809
- repositoryManagerListener . DidNotReceive ( ) . OnActiveRemoteChanged ( Arg . Any < ConfigRemote ? > ( ) ) ;
810
- repositoryManagerListener . DidNotReceive ( ) . OnLocalBranchListChanged ( ) ;
811
- repositoryManagerListener . DidNotReceive ( ) . OnRemoteBranchListChanged ( ) ;
812
- repositoryManagerListener . Received ( ) . OnIsBusyChanged ( Args . Bool ) ;
813
- repositoryManagerListener . DidNotReceive ( ) . OnLocksUpdated ( Args . EnumerableGitLock ) ;
814
-
815
- result . AssertEqual ( expected ) ;
816
-
817
- repositoryManagerListener . ClearReceivedCalls ( ) ;
818
- repositoryManagerEvents . Reset ( ) ;
819
- }
820
758
}
821
759
}
0 commit comments