Jackett/src/Jackett.Test/Common/Indexers/EraiRawsTests.cs

35 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections;
using Jackett.Common.Indexers;
using NUnit.Framework;
using Assert = NUnit.Framework.Assert;
namespace Jackett.Test.Common.Indexers
{
[TestFixture]
public class EraiRawsTests
{
[TestCaseSource(typeof(TitleParserTestData), nameof(TitleParserTestData.TestCases))]
public string TestTitleParsing(string title)
{
var titleParser = new EraiRaws.TitleParser();
return titleParser.Parse(title);
}
}
public class TitleParserTestData
{
public static IEnumerable TestCases
{
get
{
yield return new TestCaseData("[1080p] Tokyo Revengers").Returns("[1080p] Tokyo Revengers");
yield return new TestCaseData("[1080p] Tokyo Revengers 02").Returns("[1080p] Tokyo Revengers E02");
yield return new TestCaseData("[1080p] Mairimashita! Iruma-kun 2nd Season 01").Returns("[1080p] Mairimashita! Iruma-kun S2E01");
yield return new TestCaseData("[540p] Seijo no Maryoku wa Bannou Desu 02 v2 (Multi)").Returns("[540p] Seijo no Maryoku wa Bannou Desu E02 v2 (Multi)");
yield return new TestCaseData("[1080p] Yuukoku no Moriarty Part 2 01 (Multi)").Returns("[1080p] Yuukoku no Moriarty S2E01 (Multi)");
}
}
}
}