mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix downloader tests
This commit is contained in:
parent
b29bed24da
commit
790f7cd7aa
@ -1,5 +1,6 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Wabbajack.DTOs.Interventions;
|
||||
using Wabbajack.Services.OSIntegrated;
|
||||
using Xunit.DependencyInjection;
|
||||
using Xunit.DependencyInjection.Logging;
|
||||
@ -11,10 +12,19 @@ public class Startup
|
||||
public void ConfigureServices(IServiceCollection service)
|
||||
{
|
||||
service.AddOSIntegrated();
|
||||
service.AddSingleton<IUserInterventionHandler, CancellingInterventionHandler>();
|
||||
}
|
||||
|
||||
public void Configure(ILoggerFactory loggerFactory, ITestOutputHelperAccessor accessor)
|
||||
{
|
||||
loggerFactory.AddProvider(new XunitTestOutputLoggerProvider(accessor, delegate { return true; }));
|
||||
}
|
||||
|
||||
private class CancellingInterventionHandler : IUserInterventionHandler
|
||||
{
|
||||
public void Raise(IUserIntervention intervention)
|
||||
{
|
||||
intervention.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user