1313using Microsoft . VisualStudio . Shell ;
1414using Microsoft . VisualStudio . Threading ;
1515using Task = System . Threading . Tasks . Task ;
16+ using static Microsoft . VisualStudio . VSConstants ;
1617
1718public class VSGitExtTests
1819{
1920 public class TheConstructor : TestBaseClass
2021 {
2122 [ TestCase ( true , 1 ) ]
2223 [ TestCase ( false , 0 ) ]
23- public void GetServiceIGitExt_WhenSccProviderContextIsActive ( bool isActive , int expectCalls )
24+ public void GetServiceIGitExt_WhenRepositoryOpenIsActive ( bool isActive , int expectCalls )
2425 {
2526 var context = CreateVSUIContext ( isActive ) ;
2627 var sp = Substitute . For < IAsyncServiceProvider > ( ) ;
@@ -135,7 +136,7 @@ public void WhenUIContextChanged_FiredUsingThreadPoolThread()
135136 public class TheActiveRepositoriesProperty : TestBaseClass
136137 {
137138 [ Test ]
138- public void SccProviderContextNotActive_IsEmpty ( )
139+ public void RepositoryOpenContextNotActive_IsEmpty ( )
139140 {
140141 var context = CreateVSUIContext ( false ) ;
141142 var target = CreateVSGitExt ( context ) ;
@@ -144,7 +145,7 @@ public void SccProviderContextNotActive_IsEmpty()
144145 }
145146
146147 [ Test ]
147- public void SccProviderContextIsActive_InitializeWithActiveRepositories ( )
148+ public void RepositoryOpenIsActive_InitializeWithActiveRepositories ( )
148149 {
149150 var repoPath = "repoPath" ;
150151 var repoFactory = Substitute . For < ILocalRepositoryModelFactory > ( ) ;
@@ -217,8 +218,7 @@ static VSGitExt CreateVSGitExt(IVSUIContext context = null, IGitExt gitExt = nul
217218 repoFactory = repoFactory ?? Substitute . For < ILocalRepositoryModelFactory > ( ) ;
218219 joinableTaskContext = joinableTaskContext ?? new JoinableTaskContext ( ) ;
219220 var factory = Substitute . For < IVSUIContextFactory > ( ) ;
220- var contextGuid = new Guid ( Guids . GitSccProviderId ) ;
221- factory . GetUIContext ( contextGuid ) . Returns ( context ) ;
221+ factory . GetUIContext ( UICONTEXT . RepositoryOpen_guid ) . Returns ( context ) ;
222222 sp . GetServiceAsync ( typeof ( IGitExt ) ) . Returns ( gitExt ) ;
223223 var vsGitExt = new VSGitExt ( sp , factory , repoFactory , joinableTaskContext ) ;
224224 vsGitExt . JoinTillEmpty ( ) ;
0 commit comments