2
0

TestAppHost.cs 1.7 KB

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