pull/2429/head
Bond_009 5 years ago
parent 620047ab9a
commit dfd74adc15

@ -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;

Loading…
Cancel
Save