@@ -57,12 +57,11 @@ public void NoRemoteUrl()
5757 {
5858 using ( var temp = new TempDirectory ( ) )
5959 {
60- var provider = Substitutes . ServiceProvider ;
61- var gitservice = provider . GetGitService ( ) ;
60+ var gitService = Substitute . For < IGitService > ( ) ;
6261 var repo = Substitute . For < IRepository > ( ) ;
6362 var path = temp . Directory . CreateSubdirectory ( "repo-name" ) ;
64- gitservice . GetUri ( path . FullName ) . Returns ( ( UriString ) null ) ;
65- var model = new LocalRepositoryModel ( path . FullName ) ;
63+ gitService . GetUri ( path . FullName ) . Returns ( ( UriString ) null ) ;
64+ var model = new LocalRepositoryModel ( path . FullName , gitService ) ;
6665 Assert . That ( "repo-name" , Is . EqualTo ( model . Name ) ) ;
6766 }
6867 }
@@ -72,12 +71,11 @@ public void WithRemoteUrl()
7271 {
7372 using ( var temp = new TempDirectory ( ) )
7473 {
75- var provider = Substitutes . ServiceProvider ;
76- var gitservice = provider . GetGitService ( ) ;
74+ var gitService = Substitute . For < IGitService > ( ) ;
7775 var repo = Substitute . For < IRepository > ( ) ;
7876 var path = temp . Directory . CreateSubdirectory ( "repo-name" ) ;
79- gitservice . GetUri ( path . FullName ) . Returns ( new UriString ( "https://github.com/user/repo-name" ) ) ;
80- var model = new LocalRepositoryModel ( path . FullName ) ;
77+ gitService . GetUri ( path . FullName ) . Returns ( new UriString ( "https://github.com/user/repo-name" ) ) ;
78+ var model = new LocalRepositoryModel ( path . FullName , gitService ) ;
8179 Assert . That ( "repo-name" , Is . EqualTo ( model . Name ) ) ;
8280 Assert . That ( "user" , Is . EqualTo ( model . Owner ) ) ;
8381 }
0 commit comments