TestAppHost.cs 2.2 KB

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