SeriesResolverTests.cs 1.0 KB

1234567891011121314151617181920212223242526272829
  1. using Emby.Naming.Common;
  2. using Emby.Naming.TV;
  3. using Xunit;
  4. namespace Jellyfin.Naming.Tests.TV
  5. {
  6. public class SeriesResolverTests
  7. {
  8. private readonly NamingOptions _namingOptions = new NamingOptions();
  9. [Theory]
  10. [InlineData("The.Show.S01", "The Show")]
  11. [InlineData("The.Show.S01.COMPLETE", "The Show")]
  12. [InlineData("S.H.O.W.S01", "S.H.O.W")]
  13. [InlineData("The.Show.P.I.S01", "The Show P.I")]
  14. [InlineData("The_Show_Season_1", "The Show")]
  15. [InlineData("/something/The_Show/Season 10", "The Show")]
  16. [InlineData("The Show", "The Show")]
  17. [InlineData("/some/path/The Show", "The Show")]
  18. [InlineData("/some/path/The Show s02e10 720p hdtv", "The Show")]
  19. [InlineData("/some/path/The Show s02e10 the episode 720p hdtv", "The Show")]
  20. public void SeriesResolverResolveTest(string path, string name)
  21. {
  22. var res = SeriesResolver.Resolve(_namingOptions, path);
  23. Assert.Equal(name, res.Name);
  24. }
  25. }
  26. }