SeriesPathParserTest.cs 1005 B

1234567891011121314151617181920212223242526272829
  1. using Emby.Naming.Common;
  2. using Emby.Naming.TV;
  3. using Xunit;
  4. namespace Jellyfin.Naming.Tests.TV
  5. {
  6. public class SeriesPathParserTest
  7. {
  8. private readonly NamingOptions _namingOptions = new NamingOptions();
  9. [Theory]
  10. [InlineData("The.Show.S01", "The.Show")]
  11. [InlineData("/The.Show.S01", "The.Show")]
  12. [InlineData("/some/place/The.Show.S01", "The.Show")]
  13. [InlineData("/something/The.Show.S01", "The.Show")]
  14. [InlineData("The Show Season 10", "The Show")]
  15. [InlineData("The Show S01E01", "The Show")]
  16. [InlineData("The Show S01E01 Episode", "The Show")]
  17. [InlineData("/something/The Show/Season 1", "The Show")]
  18. [InlineData("/something/The Show/S01", "The Show")]
  19. public void SeriesPathParserParseTest(string path, string name)
  20. {
  21. var res = SeriesPathParser.Parse(_namingOptions, path);
  22. Assert.Equal(name, res.SeriesName);
  23. Assert.True(res.Success);
  24. }
  25. }
  26. }