aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Barron <18354464+barronpm@users.noreply.github.com>2020-08-03 21:45:15 +0000
committerGitHub <noreply@github.com>2020-08-03 21:45:15 +0000
commit8385c5459142e69eb4004d32b3d772b998c37b0b (patch)
tree0cf20aa76ec8eb100dd8d7adc850c6c1009011eb /tests
parenta28d00eebaec733d0c3b4e85da95c1e466189883 (diff)
parentdee7bdddb6f5ce0cc09dc2b20d4dab9747eea9f0 (diff)
Merge pull request #3811 from crobibero/api-cleanup
Clean up api-migration branch
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Api.Tests/GetPathValueTests.cs45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/Jellyfin.Api.Tests/GetPathValueTests.cs b/tests/Jellyfin.Api.Tests/GetPathValueTests.cs
deleted file mode 100644
index 397eb2edc..000000000
--- a/tests/Jellyfin.Api.Tests/GetPathValueTests.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using MediaBrowser.Api;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.Net;
-using MediaBrowser.Model.Configuration;
-using MediaBrowser.Model.Services;
-using Microsoft.Extensions.Logging.Abstractions;
-using Moq;
-using Xunit;
-
-namespace Jellyfin.Api.Tests
-{
- public class GetPathValueTests
- {
- [Theory]
- [InlineData("https://localhost:8096/ScheduledTasks/1234/Triggers", "", 1, "1234")]
- [InlineData("https://localhost:8096/emby/ScheduledTasks/1234/Triggers", "", 1, "1234")]
- [InlineData("https://localhost:8096/mediabrowser/ScheduledTasks/1234/Triggers", "", 1, "1234")]
- [InlineData("https://localhost:8096/jellyfin/2/ScheduledTasks/1234/Triggers", "jellyfin/2", 1, "1234")]
- [InlineData("https://localhost:8096/jellyfin/2/emby/ScheduledTasks/1234/Triggers", "jellyfin/2", 1, "1234")]
- [InlineData("https://localhost:8096/jellyfin/2/mediabrowser/ScheduledTasks/1234/Triggers", "jellyfin/2", 1, "1234")]
- [InlineData("https://localhost:8096/JELLYFIN/2/ScheduledTasks/1234/Triggers", "jellyfin/2", 1, "1234")]
- [InlineData("https://localhost:8096/JELLYFIN/2/Emby/ScheduledTasks/1234/Triggers", "jellyfin/2", 1, "1234")]
- [InlineData("https://localhost:8096/JELLYFIN/2/MediaBrowser/ScheduledTasks/1234/Triggers", "jellyfin/2", 1, "1234")]
- public void GetPathValueTest(string path, string baseUrl, int index, string value)
- {
- var reqMock = Mock.Of<IRequest>(x => x.PathInfo == path);
- var conf = new ServerConfiguration()
- {
- BaseUrl = baseUrl
- };
-
- var confManagerMock = Mock.Of<IServerConfigurationManager>(x => x.Configuration == conf);
-
- var service = new TestService(
- new NullLogger<TestService>(),
- confManagerMock,
- Mock.Of<IHttpResultFactory>())
- {
- Request = reqMock
- };
-
- Assert.Equal(value, service.GetPathValue(index).ToString());
- }
- }
-}