aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs')
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs13
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs b/tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs
index fb7cf6a471..8847239d90 100644
--- a/tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs
+++ b/tests/Jellyfin.Server.Implementations.Tests/LiveTv/HdHomerunHostTests.cs
@@ -1,5 +1,5 @@
using System;
-using System.Net;
+using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@@ -22,24 +22,15 @@ namespace Jellyfin.Server.Implementations.Tests.LiveTv
public HdHomerunHostTests()
{
- const string BaseResourcePath = "Jellyfin.Server.Implementations.Tests.LiveTv.";
-
var messageHandler = new Mock<HttpMessageHandler>();
messageHandler.Protected()
.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>())
.Returns<HttpRequestMessage, CancellationToken>(
(m, _) =>
{
- var resource = BaseResourcePath + m.RequestUri?.Segments[^1];
- var stream = typeof(HdHomerunHostTests).Assembly.GetManifestResourceStream(resource);
- if (stream == null)
- {
- throw new NullReferenceException("Resource doesn't exist: " + resource);
- }
-
return Task.FromResult(new HttpResponseMessage()
{
- Content = new StreamContent(stream)
+ Content = new StreamContent(File.OpenRead("Test Data/LiveTv/" + m.RequestUri?.Segments[^1]))
});
});