aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <Bond.009@outlook.com>2020-02-19 22:51:30 +0100
committerBond_009 <Bond.009@outlook.com>2020-02-19 22:51:30 +0100
commitdfd74adc15a1f90f2e7ae6050a563bdbef581ee2 (patch)
tree7b7b4debbe7281d5e1ad2e75c96bb1faa19919a2
parent620047ab9adeea5fc0d38f51990d456b1300b968 (diff)
Add test
-rw-r--r--tests/Jellyfin.Naming.Tests/TV/SeasonNumberTests.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/Jellyfin.Naming.Tests/TV/SeasonNumberTests.cs b/tests/Jellyfin.Naming.Tests/TV/SeasonNumberTests.cs
index ba3c5ecac..1df28c974 100644
--- a/tests/Jellyfin.Naming.Tests/TV/SeasonNumberTests.cs
+++ b/tests/Jellyfin.Naming.Tests/TV/SeasonNumberTests.cs
@@ -6,11 +6,21 @@ namespace Jellyfin.Naming.Tests.TV
{
public class SeasonNumberTests
{
- private int? GetSeasonNumberFromEpisodeFile(string path)
+ private readonly NamingOptions _namingOptions = new NamingOptions();
+
+ [Theory]
+ [InlineData("The Daily Show/The Daily Show 25x22 - [WEBDL-720p][AAC 2.0][x264] Noah Baumbach-TBS.mkv", 25)]
+ public void GetSeasonNumberFromEpisodeFileTest(string path, int? expected)
{
- var options = new NamingOptions();
+ var result = new EpisodeResolver(_namingOptions)
+ .Resolve(path, false);
- var result = new EpisodeResolver(options)
+ Assert.Equal(expected, result.SeasonNumber);
+ }
+
+ private int? GetSeasonNumberFromEpisodeFile(string path)
+ {
+ var result = new EpisodeResolver(_namingOptions)
.Resolve(path, false);
return result.SeasonNumber;