You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/tests/Jellyfin.Naming.Tests/TV/AbsoluteEpisodeNumberTests.cs

28 lines
914 B

using Emby.Naming.Common;
using Emby.Naming.TV;
using Xunit;
namespace Jellyfin.Naming.Tests.TV
{
public class AbsoluteEpisodeNumberTests
{
[Theory]
[InlineData("The Simpsons/12.avi", 12)]
[InlineData("The Simpsons/The Simpsons 12.avi", 12)]
[InlineData("The Simpsons/The Simpsons 82.avi", 82)]
[InlineData("The Simpsons/The Simpsons 112.avi", 112)]
[InlineData("The Simpsons/Foo_ep_02.avi", 2)]
[InlineData("The Simpsons/The Simpsons 889.avi", 889)]
[InlineData("The Simpsons/The Simpsons 101.avi", 101)]
public void GetEpisodeNumberFromFileTest(string path, int episodeNumber)
{
var options = new NamingOptions();
var result = new EpisodeResolver(options)
.Resolve(path, false, null, null, true);
Assert.Equal(episodeNumber, result.EpisodeNumber);
}
}
}