mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
27 lines
927 B
C#
27 lines
927 B
C#
using Emby.Naming.Common;
|
|
using Emby.Naming.TV;
|
|
using Xunit;
|
|
|
|
namespace Jellyfin.Naming.Tests.TV
|
|
{
|
|
public class AbsoluteEpisodeNumberTests
|
|
{
|
|
private readonly EpisodeResolver _resolver = new EpisodeResolver(new NamingOptions());
|
|
|
|
[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 result = _resolver.Resolve(path, false, null, null, true);
|
|
|
|
Assert.Equal(episodeNumber, result?.EpisodeNumber);
|
|
}
|
|
}
|
|
}
|