aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Api.Tests/TestAppHost.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2021-02-22 21:00:15 -0500
committerGitHub <noreply@github.com>2021-02-22 21:00:15 -0500
commitda55462d92f645d20f63eab3d7ffc8e141497ac5 (patch)
treef839d6f689308be9b74b4f53f01df70f984c9b06 /tests/Jellyfin.Api.Tests/TestAppHost.cs
parent1442a63556e87f1318ff091df81c4ffa083de699 (diff)
parentbaadc48f43ec425659d0d7210f1a97416d7d34c5 (diff)
Merge pull request #5291 from Bond-009/tests12
Diffstat (limited to 'tests/Jellyfin.Api.Tests/TestAppHost.cs')
-rw-r--r--tests/Jellyfin.Api.Tests/TestAppHost.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/Jellyfin.Api.Tests/TestAppHost.cs b/tests/Jellyfin.Api.Tests/TestAppHost.cs
new file mode 100644
index 000000000..772e98d04
--- /dev/null
+++ b/tests/Jellyfin.Api.Tests/TestAppHost.cs
@@ -0,0 +1,51 @@
+using System.Collections.Generic;
+using System.Reflection;
+using Emby.Server.Implementations;
+using Jellyfin.Server;
+using MediaBrowser.Controller;
+using MediaBrowser.Model.IO;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+
+namespace Jellyfin.Api.Tests
+{
+ /// <summary>
+ /// Implementation of the abstract <see cref="ApplicationHost" /> class.
+ /// </summary>
+ public class TestAppHost : CoreAppHost
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestAppHost" /> class.
+ /// </summary>
+ /// <param name="applicationPaths">The <see cref="ServerApplicationPaths" /> to be used by the <see cref="CoreAppHost" />.</param>
+ /// <param name="loggerFactory">The <see cref="ILoggerFactory" /> to be used by the <see cref="CoreAppHost" />.</param>
+ /// <param name="options">The <see cref="StartupOptions" /> to be used by the <see cref="CoreAppHost" />.</param>
+ /// <param name="fileSystem">The <see cref="IFileSystem" /> to be used by the <see cref="CoreAppHost" />.</param>
+ /// <param name="collection">The <see cref="IServiceCollection"/> to be used by the <see cref="CoreAppHost"/>.</param>
+ public TestAppHost(
+ IServerApplicationPaths applicationPaths,
+ ILoggerFactory loggerFactory,
+ IStartupOptions options,
+ IFileSystem fileSystem,
+ IServiceCollection collection)
+ : base(
+ applicationPaths,
+ loggerFactory,
+ options,
+ fileSystem,
+ collection)
+ {
+ }
+
+ /// <inheritdoc />
+ protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
+ {
+ foreach (var a in base.GetAssembliesWithPartsInternal())
+ {
+ yield return a;
+ }
+
+ yield return typeof(TestPlugin).Assembly;
+ }
+ }
+}