mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix tests
This commit is contained in:
@ -19,7 +19,6 @@ public class Startup
|
|||||||
});
|
});
|
||||||
|
|
||||||
service.AddScoped<ModListHarness>();
|
service.AddScoped<ModListHarness>();
|
||||||
service.AddSingleton<Configuration>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(ILoggerFactory loggerFactory, ITestOutputHelperAccessor accessor)
|
public void Configure(ILoggerFactory loggerFactory, ITestOutputHelperAccessor accessor)
|
||||||
|
@ -64,6 +64,22 @@ public static class ServiceExtensions
|
|||||||
return ((int) s.MaxTasks, s.MaxThroughput);
|
return ((int) s.MaxTasks, s.MaxThroughput);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
|
||||||
|
service.AddSingleton(s => new Configuration
|
||||||
|
{
|
||||||
|
EncryptedDataLocation = KnownFolders.WabbajackAppLocal.Combine("encrypted"),
|
||||||
|
ModListsDownloadLocation = KnownFolders.EntryPoint.Combine("downloaded_mod_lists"),
|
||||||
|
SavedSettingsLocation = KnownFolders.WabbajackAppLocal.Combine("saved_settings"),
|
||||||
|
LogLocation = KnownFolders.EntryPoint.Combine("logs"),
|
||||||
|
ImageCacheLocation = KnownFolders.WabbajackAppLocal.Combine("image_cache")
|
||||||
|
});
|
||||||
|
|
||||||
|
service.AddSingleton<SettingsManager>();
|
||||||
|
service.AddSingleton<ResourceSettingsManager>();
|
||||||
|
|
||||||
|
// Resources
|
||||||
|
|
||||||
service.AddAllSingleton<IResource, IResource<DownloadDispatcher>>(s =>
|
service.AddAllSingleton<IResource, IResource<DownloadDispatcher>>(s =>
|
||||||
new Resource<DownloadDispatcher>("Downloads", GetSettings(s, "Downloads")));
|
new Resource<DownloadDispatcher>("Downloads", GetSettings(s, "Downloads")));
|
||||||
@ -86,7 +102,6 @@ public static class ServiceExtensions
|
|||||||
// Networking
|
// Networking
|
||||||
service.AddSingleton<HttpClient>();
|
service.AddSingleton<HttpClient>();
|
||||||
service.AddAllSingleton<IHttpDownloader, SingleThreadedDownloader>();
|
service.AddAllSingleton<IHttpDownloader, SingleThreadedDownloader>();
|
||||||
service.AddSingleton<Configuration>();
|
|
||||||
|
|
||||||
service.AddSingleton<Client>();
|
service.AddSingleton<Client>();
|
||||||
service.AddSingleton<WriteOnlyClient>();
|
service.AddSingleton<WriteOnlyClient>();
|
||||||
@ -135,19 +150,7 @@ public static class ServiceExtensions
|
|||||||
Version = version
|
Version = version
|
||||||
});
|
});
|
||||||
|
|
||||||
// Settings
|
|
||||||
|
|
||||||
service.AddSingleton(s => new Configuration
|
|
||||||
{
|
|
||||||
EncryptedDataLocation = KnownFolders.WabbajackAppLocal.Combine("encrypted"),
|
|
||||||
ModListsDownloadLocation = KnownFolders.EntryPoint.Combine("downloaded_mod_lists"),
|
|
||||||
SavedSettingsLocation = KnownFolders.WabbajackAppLocal.Combine("saved_settings"),
|
|
||||||
LogLocation = KnownFolders.EntryPoint.Combine("logs"),
|
|
||||||
ImageCacheLocation = KnownFolders.WabbajackAppLocal.Combine("image_cache")
|
|
||||||
});
|
|
||||||
|
|
||||||
service.AddSingleton<SettingsManager>();
|
|
||||||
service.AddSingleton<ResourceSettingsManager>();
|
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user