@@ -154,10 +154,12 @@ protected string InitNewRepository(bool isBare = false)
154
154
return Repository . Init ( scd . DirectoryPath , isBare ) ;
155
155
}
156
156
157
- protected Repository InitIsolatedRepository ( string path = null , bool isBare = false )
157
+ protected Repository InitIsolatedRepository ( string path = null , bool isBare = false , RepositoryOptions options = null )
158
158
{
159
- path = path ?? InitNewRepository ( ) ;
160
- return new Repository ( path , options : BuildFakeConfigs ( BuildSelfCleaningDirectory ( ) ) ) ;
159
+ path = path ?? InitNewRepository ( isBare ) ;
160
+ options = BuildFakeConfigs ( BuildSelfCleaningDirectory ( ) , options ) ;
161
+
162
+ return new Repository ( path , options ) ;
161
163
}
162
164
163
165
public void Register ( string directoryPath )
@@ -230,9 +232,9 @@ protected static void AssertValueInConfigFile(string configFilePath, string rege
230
232
Assert . True ( r . Success , text ) ;
231
233
}
232
234
233
- public RepositoryOptions BuildFakeConfigs ( SelfCleaningDirectory scd )
235
+ public RepositoryOptions BuildFakeConfigs ( SelfCleaningDirectory scd , RepositoryOptions options = null )
234
236
{
235
- var options = BuildFakeRepositoryOptions ( scd ) ;
237
+ options = BuildFakeRepositoryOptions ( scd , options ) ;
236
238
237
239
StringBuilder sb = new StringBuilder ( )
238
240
. AppendFormat ( "[Woot]{0}" , Environment . NewLine )
@@ -254,21 +256,18 @@ public RepositoryOptions BuildFakeConfigs(SelfCleaningDirectory scd)
254
256
return options ;
255
257
}
256
258
257
- private static RepositoryOptions BuildFakeRepositoryOptions ( SelfCleaningDirectory scd )
259
+ private static RepositoryOptions BuildFakeRepositoryOptions ( SelfCleaningDirectory scd , RepositoryOptions options = null )
258
260
{
261
+ options = options ?? new RepositoryOptions ( ) ;
262
+
259
263
string confs = Path . Combine ( scd . DirectoryPath , "confs" ) ;
260
264
Directory . CreateDirectory ( confs ) ;
261
265
262
- string globalLocation = Path . Combine ( confs , "my-global-config" ) ;
263
- string xdgLocation = Path . Combine ( confs , "my-xdg-config" ) ;
264
- string systemLocation = Path . Combine ( confs , "my-system-config" ) ;
266
+ options . GlobalConfigurationLocation = Path . Combine ( confs , "my-global-config" ) ;
267
+ options . XdgConfigurationLocation = Path . Combine ( confs , "my-xdg-config" ) ;
268
+ options . SystemConfigurationLocation = Path . Combine ( confs , "my-system-config" ) ;
265
269
266
- return new RepositoryOptions
267
- {
268
- GlobalConfigurationLocation = globalLocation ,
269
- XdgConfigurationLocation = xdgLocation ,
270
- SystemConfigurationLocation = systemLocation ,
271
- } ;
270
+ return options ;
272
271
}
273
272
274
273
/// <summary>
0 commit comments