Browse Source

Add additional resolver tests

Erik Rigtorp 5 năm trước cách đây
mục cha
commit
82ff3fa75d

+ 1 - 0
tests/Jellyfin.Naming.Tests/Video/CleanDateTimeTests.cs

@@ -47,6 +47,7 @@ namespace Jellyfin.Naming.Tests.Video
         // FIXME: [InlineData("Robin Hood [Multi-Subs] [2018].mkv", "Robin Hood", 2018)]
         [InlineData(@"3.Days.to.Kill.2014.720p.BluRay.x264.YIFY.mkv", "3.Days.to.Kill", 2014)] // In this test case, running CleanDateTime first produces no date, so it will attempt to run CleanString first and then CleanDateTime again
         [InlineData("3 days to kill (2005).mkv", "3 days to kill", 2005)]
+        [InlineData(@"Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem.mp4", "Rain Man", 1988)]
         public void CleanDateTimeTest(string input, string expectedName, int? expectedYear)
         {
             input = Path.GetFileName(input);

+ 10 - 0
tests/Jellyfin.Naming.Tests/Video/VideoResolverTests.cs

@@ -174,6 +174,16 @@ namespace Jellyfin.Naming.Tests.Video
                     Year = 2006,
                 }
             };
+            yield return new object[]
+            {
+                new VideoFileInfo()
+                {
+                    Path = @"/server/Movies/Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem/Rain Man 1988 REMASTERED 1080p BluRay x264 AAC - Ozlem.mp4",
+                    Container = "mp4",
+                    Name = "Rain Man",
+                    Year = 1988,
+                }
+            };
         }
 
         [Theory]