TestAppHost.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Collections.Generic;
  2. using System.Reflection;
  3. using Emby.Server.Implementations;
  4. using MediaBrowser.Controller;
  5. using MediaBrowser.Model.IO;
  6. using Microsoft.Extensions.Configuration;
  7. using Microsoft.Extensions.DependencyInjection;
  8. using Microsoft.Extensions.Logging;
  9. namespace Jellyfin.Server.Integration.Tests
  10. {
  11. /// <summary>
  12. /// Implementation of the abstract <see cref="ApplicationHost" /> class.
  13. /// </summary>
  14. public class TestAppHost : CoreAppHost
  15. {
  16. /// <summary>
  17. /// Initializes a new instance of the <see cref="TestAppHost" /> class.
  18. /// </summary>
  19. /// <param name="applicationPaths">The <see cref="ServerApplicationPaths" /> to be used by the <see cref="CoreAppHost" />.</param>
  20. /// <param name="loggerFactory">The <see cref="ILoggerFactory" /> to be used by the <see cref="CoreAppHost" />.</param>
  21. /// <param name="options">The <see cref="StartupOptions" /> to be used by the <see cref="CoreAppHost" />.</param>
  22. /// <param name="startup">The <see cref="IConfiguration" /> to be used by the <see cref="CoreAppHost" />.</param>
  23. /// <param name="fileSystem">The <see cref="IFileSystem" /> to be used by the <see cref="CoreAppHost" />.</param>
  24. /// <param name="collection">The <see cref="IServiceCollection"/> to be used by the <see cref="CoreAppHost"/>.</param>
  25. public TestAppHost(
  26. IServerApplicationPaths applicationPaths,
  27. ILoggerFactory loggerFactory,
  28. IStartupOptions options,
  29. IConfiguration startup,
  30. IFileSystem fileSystem,
  31. IServiceCollection collection)
  32. : base(
  33. applicationPaths,
  34. loggerFactory,
  35. options,
  36. startup,
  37. fileSystem,
  38. collection)
  39. {
  40. }
  41. /// <inheritdoc />
  42. protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
  43. {
  44. foreach (var a in base.GetAssembliesWithPartsInternal())
  45. {
  46. yield return a;
  47. }
  48. yield return typeof(TestPlugin).Assembly;
  49. }
  50. }
  51. }