@@ -170,17 +170,16 @@ public async Task Repository_Name_Replaces_Last_Part_Of_Non_Base_Path()
170170 [ TestCase ( "c:\\ base" , "owner1/repo1" , "c:\\ new\\ base" , "owner2/repo2" , "c:\\ new\\ base\\ owner2\\ repo2" ,
171171 Description = "Base path changed and repo owner/name deleted" ) ]
172172
173- [ TestCase ( "c:\\ base" , "owner1/repo1" , "" , "owner2/repo2" , "owner2\\ repo2" ,
173+ [ TestCase ( "c:\\ base" , "owner1/repo1" , "" , "owner2/repo2" , "c: \\ base \\ owner2\\ repo2" ,
174174 Description = "Base path cleared" ) ]
175175 [ TestCase ( "c:\\ base" , "owner1/repo1" , "c:\\ base\\ repo1" , "owner2/repo2" , "c:\\ base\\ repo1\\ owner2\\ repo2" ,
176176 Description = "Owner deleted looks like base path change" ) ]
177- public async Task User_Edits_Path ( string basePath , string repo1 , string userPath , string repo2 , string expectPath )
177+ public async Task User_Edits_Path ( string defaultClonePath , string repo1 , string userPath , string repo2 , string expectPath )
178178 {
179- var target = CreateTarget ( ) ;
180-
181- target . Path = basePath ;
179+ var target = CreateTarget ( defaultClonePath : defaultClonePath ) ;
182180 SetRepository ( target . GitHubTab , CreateRepositoryModel ( repo1 ) ) ;
183181 target . Path = userPath ;
182+
184183 SetRepository ( target . GitHubTab , CreateRepositoryModel ( repo2 ) ) ;
185184
186185 Assert . That ( target . Path , Is . EqualTo ( expectPath ) ) ;
@@ -261,10 +260,10 @@ static IRepositorySelectViewModel CreateSelectViewModel()
261260 return result ;
262261 }
263262
264- static IRepositoryCloneService CreateRepositoryCloneService ( )
263+ static IRepositoryCloneService CreateRepositoryCloneService ( string defaultClonePath )
265264 {
266265 var result = Substitute . For < IRepositoryCloneService > ( ) ;
267- result . DefaultClonePath . Returns ( "d: \\ efault \\ path" ) ;
266+ result . DefaultClonePath . Returns ( defaultClonePath ) ;
268267 result . DestinationExists ( "d:\\ exists" ) . Returns ( true ) ;
269268 return result ;
270269 }
@@ -275,11 +274,12 @@ static RepositoryCloneViewModel CreateTarget(
275274 IRepositoryCloneService service = null ,
276275 IRepositorySelectViewModel gitHubTab = null ,
277276 IRepositorySelectViewModel enterpriseTab = null ,
278- IRepositoryUrlViewModel urlTab = null )
277+ IRepositoryUrlViewModel urlTab = null ,
278+ string defaultClonePath = "d:\\ efault\\ path" )
279279 {
280280 os = os ?? Substitute . For < IOperatingSystem > ( ) ;
281281 connectionManager = connectionManager ?? CreateConnectionManager ( "https://github.com" ) ;
282- service = service ?? CreateRepositoryCloneService ( ) ;
282+ service = service ?? CreateRepositoryCloneService ( defaultClonePath ) ;
283283 gitHubTab = gitHubTab ?? CreateSelectViewModel ( ) ;
284284 enterpriseTab = enterpriseTab ?? CreateSelectViewModel ( ) ;
285285 urlTab = urlTab ?? Substitute . For < IRepositoryUrlViewModel > ( ) ;
0 commit comments