mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
QualityTypes no longer an enum
This commit is contained in:
parent
49f086cf19
commit
92acb4c049
37 changed files with 585 additions and 247 deletions
|
@ -20,6 +20,15 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
[TestFixture]
|
||||
public class DownloadProviderFixture : CoreTest
|
||||
{
|
||||
public static object[] SabNamingCases =
|
||||
{
|
||||
new object[] { 1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, false, "My Series Name - 1x02 - My Episode Title [DVD]" },
|
||||
new object[] { 1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, true, "My Series Name - 1x02 - My Episode Title [DVD] [Proper]" },
|
||||
new object[] { 1, new[] { 2 }, "", QualityTypes.DVD, true, "My Series Name - 1x02 - [DVD] [Proper]" },
|
||||
new object[] { 1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, false, "My Series Name - 1x02-1x04 - My Episode Title [HDTV]" },
|
||||
new object[] { 1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, true, "My Series Name - 1x02-1x04 - My Episode Title [HDTV] [Proper]" },
|
||||
new object[] { 1, new[] { 2, 4 }, "", QualityTypes.HDTV, true, "My Series Name - 1x02-1x04 - [HDTV] [Proper]" },
|
||||
};
|
||||
|
||||
private void SetDownloadClient(DownloadClientType clientType)
|
||||
{
|
||||
|
@ -68,7 +77,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.Returns(false);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Download_report_should_send_to_sab_add_to_history_mark_as_grabbed()
|
||||
{
|
||||
|
@ -162,8 +170,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.Verify(c => c.OnGrab(It.IsAny<String>()), Times.Never());
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_return_sab_as_active_client()
|
||||
{
|
||||
|
@ -178,14 +184,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
Mocker.Resolve<DownloadProvider>().GetActiveDownloadClient().Should().BeAssignableTo<BlackholeProvider>();
|
||||
}
|
||||
|
||||
|
||||
[TestCase(1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, false, Result = "My Series Name - 1x02 - My Episode Title [DVD]")]
|
||||
[TestCase(1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, true, Result = "My Series Name - 1x02 - My Episode Title [DVD] [Proper]")]
|
||||
[TestCase(1, new[] { 2 }, "", QualityTypes.DVD, true, Result = "My Series Name - 1x02 - [DVD] [Proper]")]
|
||||
[TestCase(1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, false, Result = "My Series Name - 1x02-1x04 - My Episode Title [HDTV]")]
|
||||
[TestCase(1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, true, Result = "My Series Name - 1x02-1x04 - My Episode Title [HDTV] [Proper]")]
|
||||
[TestCase(1, new[] { 2, 4 }, "", QualityTypes.HDTV, true, Result = "My Series Name - 1x02-1x04 - [HDTV] [Proper]")]
|
||||
public string create_proper_sab_titles(int seasons, int[] episodes, string title, QualityTypes quality, bool proper)
|
||||
[Test, TestCaseSource("SabNamingCases")]
|
||||
public void create_proper_sab_titles(int seasons, int[] episodes, string title, QualityTypes quality, bool proper, string expected)
|
||||
{
|
||||
var series = Builder<Series>.CreateNew()
|
||||
.With(c => c.Title = "My Series Name")
|
||||
|
@ -201,7 +201,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
EpisodeTitle = title
|
||||
};
|
||||
|
||||
return Mocker.Resolve<DownloadProvider>().GetDownloadTitle(parsResult);
|
||||
Mocker.Resolve<DownloadProvider>().GetDownloadTitle(parsResult).Should().Be(expected);
|
||||
}
|
||||
|
||||
[TestCase(true, Result = "My Series Name - Season 1 [Bluray720p] [Proper]")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue