jellyfin/tests/Jellyfin.Naming.Tests/TV/SeriesPathParserTest.cs
Bond_009 71ebe220f0 Speed up Jellyfin.Naming.Tests
In my limited testing this saves ~4 seconds, from 19 to 15 seconds (in
        Xunit itself)
2022-01-04 17:59:30 +01:00

30 lines
1005 B
C#

using Emby.Naming.Common;
using Emby.Naming.TV;
using Xunit;
namespace Jellyfin.Naming.Tests.TV
{
public class SeriesPathParserTest
{
private readonly NamingOptions _namingOptions = new NamingOptions();
[Theory]
[InlineData("The.Show.S01", "The.Show")]
[InlineData("/The.Show.S01", "The.Show")]
[InlineData("/some/place/The.Show.S01", "The.Show")]
[InlineData("/something/The.Show.S01", "The.Show")]
[InlineData("The Show Season 10", "The Show")]
[InlineData("The Show S01E01", "The Show")]
[InlineData("The Show S01E01 Episode", "The Show")]
[InlineData("/something/The Show/Season 1", "The Show")]
[InlineData("/something/The Show/S01", "The Show")]
public void SeriesPathParserParseTest(string path, string name)
{
var res = SeriesPathParser.Parse(_namingOptions, path);
Assert.Equal(name, res.SeriesName);
Assert.True(res.Success);
}
}
}