aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs')
-rw-r--r--tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs63
1 files changed, 31 insertions, 32 deletions
diff --git a/tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs b/tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs
index ed3112936..69de96a47 100644
--- a/tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs
+++ b/tests/Jellyfin.Naming.Tests/Video/Format3DTests.cs
@@ -4,29 +4,29 @@ using Xunit;
namespace Jellyfin.Naming.Tests.Video
{
- public class Format3DTests : BaseVideoTest
+ public class Format3DTests
{
+ private readonly NamingOptions _namingOptions = new NamingOptions();
+
[Fact]
public void TestKodiFormat3D()
{
- var options = new NamingOptions();
-
- Test("Super movie.3d.mp4", false, null, options);
- Test("Super movie.3d.hsbs.mp4", true, "hsbs", options);
- Test("Super movie.3d.sbs.mp4", true, "sbs", options);
- Test("Super movie.3d.htab.mp4", true, "htab", options);
- Test("Super movie.3d.tab.mp4", true, "tab", options);
- Test("Super movie 3d hsbs.mp4", true, "hsbs", options);
+ Test("Super movie.3d.mp4", false, null);
+ Test("Super movie.3d.hsbs.mp4", true, "hsbs");
+ Test("Super movie.3d.sbs.mp4", true, "sbs");
+ Test("Super movie.3d.htab.mp4", true, "htab");
+ Test("Super movie.3d.tab.mp4", true, "tab");
+ Test("Super movie 3d hsbs.mp4", true, "hsbs");
}
[Fact]
public void Test3DName()
{
var result =
- GetParser().ResolveFile(@"C:/Users/media/Desktop/Video Test/Movies/Oblivion/Oblivion.3d.hsbs.mkv");
+ new VideoResolver(_namingOptions).ResolveFile(@"C:/Users/media/Desktop/Video Test/Movies/Oblivion/Oblivion.3d.hsbs.mkv");
- Assert.Equal("hsbs", result.Format3D);
- Assert.Equal("Oblivion", result.Name);
+ Assert.Equal("hsbs", result?.Format3D);
+ Assert.Equal("Oblivion", result?.Name);
}
[Fact]
@@ -34,32 +34,31 @@ namespace Jellyfin.Naming.Tests.Video
{
// These were introduced for Media Browser 3
// Kodi conventions are preferred but these still need to be supported
- var options = new NamingOptions();
- Test("Super movie.3d.mp4", false, null, options);
- Test("Super movie.3d.hsbs.mp4", true, "hsbs", options);
- Test("Super movie.3d.sbs.mp4", true, "sbs", options);
- Test("Super movie.3d.htab.mp4", true, "htab", options);
- Test("Super movie.3d.tab.mp4", true, "tab", options);
+ Test("Super movie.3d.mp4", false, null);
+ Test("Super movie.3d.hsbs.mp4", true, "hsbs");
+ Test("Super movie.3d.sbs.mp4", true, "sbs");
+ Test("Super movie.3d.htab.mp4", true, "htab");
+ Test("Super movie.3d.tab.mp4", true, "tab");
- Test("Super movie.hsbs.mp4", true, "hsbs", options);
- Test("Super movie.sbs.mp4", true, "sbs", options);
- Test("Super movie.htab.mp4", true, "htab", options);
- Test("Super movie.tab.mp4", true, "tab", options);
- Test("Super movie.sbs3d.mp4", true, "sbs3d", options);
- Test("Super movie.3d.mvc.mp4", true, "mvc", options);
+ Test("Super movie.hsbs.mp4", true, "hsbs");
+ Test("Super movie.sbs.mp4", true, "sbs");
+ Test("Super movie.htab.mp4", true, "htab");
+ Test("Super movie.tab.mp4", true, "tab");
+ Test("Super movie.sbs3d.mp4", true, "sbs3d");
+ Test("Super movie.3d.mvc.mp4", true, "mvc");
- Test("Super movie [3d].mp4", false, null, options);
- Test("Super movie [hsbs].mp4", true, "hsbs", options);
- Test("Super movie [fsbs].mp4", true, "fsbs", options);
- Test("Super movie [ftab].mp4", true, "ftab", options);
- Test("Super movie [htab].mp4", true, "htab", options);
- Test("Super movie [sbs3d].mp4", true, "sbs3d", options);
+ Test("Super movie [3d].mp4", false, null);
+ Test("Super movie [hsbs].mp4", true, "hsbs");
+ Test("Super movie [fsbs].mp4", true, "fsbs");
+ Test("Super movie [ftab].mp4", true, "ftab");
+ Test("Super movie [htab].mp4", true, "htab");
+ Test("Super movie [sbs3d].mp4", true, "sbs3d");
}
- private void Test(string input, bool is3D, string format3D, NamingOptions options)
+ private void Test(string input, bool is3D, string? format3D)
{
- var parser = new Format3DParser(options);
+ var parser = new Format3DParser(_namingOptions);
var result = parser.Parse(input);