fix season parsing tests

This commit is contained in:
Bogdan 2024-07-06 12:47:34 +03:00
parent 9a62a5d453
commit 5f7e05afd7
1 changed files with 10 additions and 10 deletions

View File

@ -6,20 +6,20 @@ namespace Jackett.Test.Common.Models.DTO
[TestFixture]
public class ApiSearchTests
{
[TestCase("The.Good.Lord.S01E05.720p.WEB.H264-CAKES", "The.Good.Lord.S01E05.720p.WEB.H264-CAKES", 0, null)]
[TestCase("The.Good.Lord.S01E05.", "The.Good.Lord.S01E05.", 0, null)]
[TestCase("The.Good.Lord.S01E05.720p.WEB.H264-CAKES", "The.Good.Lord.S01E05.720p.WEB.H264-CAKES", null, null)]
[TestCase("The.Good.Lord.S01E05.", "The.Good.Lord.S01E05.", null, null)]
[TestCase("The.Good.Lord.S01E05", "The.Good.Lord. S01E05", 1, "5")]
[TestCase("The Good Lord S01E05", "The Good Lord S01E05", 1, "5")]
[TestCase("The Good Lord S01 E05", "The Good Lord S01E05", 1, "5")]
[TestCase("The Good Lord S01", "The Good Lord S01", 1, null)]
[TestCase("The Good Lord E05", "The Good Lord", 0, "5")]
[TestCase("The.Good.Lord.s01e05", "The.Good.Lord.s01e05", 0, null)]
[TestCase("The.Good.Lord.S01e05", "The.Good.Lord.S01e05", 0, null)]
[TestCase("The.Good.Lord.s01E05", "The.Good.Lord.s01E05", 0, null)]
[TestCase("The.Good.Lord.S1E5", "The.Good.Lord.S1E5", 0, null)]
[TestCase("The.Good.Lord.S11E5", "The.Good.Lord.S11E5", 0, null)]
[TestCase("The.Good.Lord.S1E15", "The.Good.Lord.S1E15", 0, null)]
public void TestToTorznabQuery(string query, string expected, int season, string episode)
[TestCase("The Good Lord E05", "The Good Lord", null, "5")]
[TestCase("The.Good.Lord.s01e05", "The.Good.Lord.s01e05", null, null)]
[TestCase("The.Good.Lord.S01e05", "The.Good.Lord.S01e05", null, null)]
[TestCase("The.Good.Lord.s01E05", "The.Good.Lord.s01E05", null, null)]
[TestCase("The.Good.Lord.S1E5", "The.Good.Lord.S1E5", null, null)]
[TestCase("The.Good.Lord.S11E5", "The.Good.Lord.S11E5", null, null)]
[TestCase("The.Good.Lord.S1E15", "The.Good.Lord.S1E15", null, null)]
public void TestToTorznabQuery(string query, string expected, int? season, string episode)
{
var request = new ApiSearch { Query = query };
var currentQuery = ApiSearch.ToTorznabQuery(request);