From 790f7cd7aad3c35511c33f50cc0a783184e3a3b2 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 7 Jun 2022 21:51:39 -0600 Subject: [PATCH] Fix downloader tests --- Wabbajack.Downloaders.Dispatcher.Test/Startup.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Wabbajack.Downloaders.Dispatcher.Test/Startup.cs b/Wabbajack.Downloaders.Dispatcher.Test/Startup.cs index d04adf61..1a8143d5 100644 --- a/Wabbajack.Downloaders.Dispatcher.Test/Startup.cs +++ b/Wabbajack.Downloaders.Dispatcher.Test/Startup.cs @@ -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(); } 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(); + } + } } \ No newline at end of file