aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Naming.Tests/TV/EpisodeWithoutSeasonTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.Naming.Tests/TV/EpisodeWithoutSeasonTests.cs')
-rw-r--r--tests/Jellyfin.Naming.Tests/TV/EpisodeWithoutSeasonTests.cs56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/Jellyfin.Naming.Tests/TV/EpisodeWithoutSeasonTests.cs b/tests/Jellyfin.Naming.Tests/TV/EpisodeWithoutSeasonTests.cs
new file mode 100644
index 0000000000..c2851ccdb1
--- /dev/null
+++ b/tests/Jellyfin.Naming.Tests/TV/EpisodeWithoutSeasonTests.cs
@@ -0,0 +1,56 @@
+using Emby.Naming.Common;
+using Emby.Naming.TV;
+using Xunit;
+
+namespace Jellyfin.Naming.Tests.TV
+{
+ public class EpisodeWithoutSeasonTests
+ {
+ // FIXME
+ // [Fact]
+ public void TestWithoutSeason1()
+ {
+ Test(@"/server/anything_ep02.mp4", "anything", null, 2);
+ }
+
+ // FIXME
+ // [Fact]
+ public void TestWithoutSeason2()
+ {
+ Test(@"/server/anything_ep_02.mp4", "anything", null, 2);
+ }
+
+ // FIXME
+ // [Fact]
+ public void TestWithoutSeason3()
+ {
+ Test(@"/server/anything_part.II.mp4", "anything", null, null);
+ }
+
+ // FIXME
+ // [Fact]
+ public void TestWithoutSeason4()
+ {
+ Test(@"/server/anything_pt.II.mp4", "anything", null, null);
+ }
+
+ // FIXME
+ // [Fact]
+ public void TestWithoutSeason5()
+ {
+ Test(@"/server/anything_pt_II.mp4", "anything", null, null);
+ }
+
+ private void Test(string path, string seriesName, int? seasonNumber, int? episodeNumber)
+ {
+ var options = new NamingOptions();
+
+ var result = new EpisodeResolver(options)
+ .Resolve(path, false);
+
+ Assert.Equal(seasonNumber, result.SeasonNumber);
+ Assert.Equal(episodeNumber, result.EpisodeNumber);
+ Assert.Equal(seriesName, result.SeriesName, true);
+ }
+ }
+}