aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2020-08-16 17:25:14 -0400
committerPatrick Barron <barronpm@gmail.com>2020-08-16 17:25:14 -0400
commita77cf53573f95c5db27470bd0701c304f7a01c9e (patch)
treefbfc02bca7ef4e264636a95b7350ee5de38c95dd /tests
parent075ae53d831abdb4eb72aa7da575058a51d36753 (diff)
Allow plugins to register services.
Diffstat (limited to 'tests')
-rw-r--r--tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs b/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs
index c39ed07de..2029f88e9 100644
--- a/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs
+++ b/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs
@@ -72,6 +72,7 @@ namespace MediaBrowser.Api.Tests
var startupConfig = Program.CreateAppConfiguration(commandLineOpts, appPaths);
ILoggerFactory loggerFactory = new SerilogLoggerFactory();
+ var serviceCollection = new ServiceCollection();
_disposableComponents.Add(loggerFactory);
// Create the app host and initialize it
@@ -80,10 +81,10 @@ namespace MediaBrowser.Api.Tests
loggerFactory,
commandLineOpts,
new ManagedFileSystem(loggerFactory.CreateLogger<ManagedFileSystem>(), appPaths),
- new NetworkManager(loggerFactory.CreateLogger<NetworkManager>()));
+ new NetworkManager(loggerFactory.CreateLogger<NetworkManager>()),
+ serviceCollection);
_disposableComponents.Add(appHost);
- var serviceCollection = new ServiceCollection();
- appHost.Init(serviceCollection);
+ appHost.Init();
// Configure the web host builder
Program.ConfigureWebHostBuilder(builder, appHost, serviceCollection, commandLineOpts, startupConfig, appPaths);