SeriesPathParserTest.cs 965 B

12345678910111213141516171819202122232425262728
  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. [Theory]
  9. [InlineData("The.Show.S01", "The.Show")]
  10. [InlineData("/The.Show.S01", "The.Show")]
  11. [InlineData("/some/place/The.Show.S01", "The.Show")]
  12. [InlineData("/something/The.Show.S01", "The.Show")]
  13. [InlineData("The Show Season 10", "The Show")]
  14. [InlineData("The Show S01E01", "The Show")]
  15. [InlineData("The Show S01E01 Episode", "The Show")]
  16. [InlineData("/something/The Show/Season 1", "The Show")]
  17. [InlineData("/something/The Show/S01", "The Show")]
  18. public void SeriesPathParserParseTest(string path, string name)
  19. {
  20. NamingOptions o = new NamingOptions();
  21. var res = SeriesPathParser.Parse(o, path);
  22. Assert.Equal(name, res.SeriesName);
  23. Assert.True(res.Success);
  24. }
  25. }
  26. }