1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 01:27:00 +00:00

Fixed the tests that were deleted by gdrive.

This commit is contained in:
Mark McDowall 2013-02-24 16:08:09 -08:00
parent ed3a503342
commit c5269630e0
2 changed files with 30 additions and 28 deletions

View file

@ -5,6 +5,7 @@
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Model;
using NzbDrone.Core.Providers;
@ -28,7 +29,7 @@ public void Setup()
private void WithAutoIgnore(bool autoIgnore)
{
Mocker.GetMock<ConfigProvider>()
Mocker.GetMock<ConfigService>()
.SetupGet(c => c.AutoIgnorePreviouslyDownloadedEpisodes).Returns(autoIgnore);
}

View file

@ -7,6 +7,7 @@
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Providers.Core;
@ -38,7 +39,7 @@ public void GetNewFilename_Series_Episode_Quality_S01E05_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -65,7 +66,7 @@ public void GetNewFilename_Episode_Quality_1x05_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -92,7 +93,7 @@ public void GetNewFilename_Series_Quality_01x05_Space()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -119,7 +120,7 @@ public void GetNewFilename_Series_s01e05_Space()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -147,7 +148,7 @@ public void GetNewFilename_Series_Episode_s01e05_Periods()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -174,7 +175,7 @@ public void GetNewFilename_Series_Episode_s01e05_Dash_Periods_Quality()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -201,7 +202,7 @@ public void GetNewFilename_S01E05_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -229,7 +230,7 @@ public void GetNewFilename_multi_Series_Episode_Quality_S01E05_Scene_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -263,7 +264,7 @@ public void GetNewFilename_multi_Episode_Quality_1x05_Repeat_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -297,7 +298,7 @@ public void GetNewFilename_multi_Episode_Quality_01x05_Repeat_Space()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -331,7 +332,7 @@ public void GetNewFilename_multi_Series_Episode_s01e05_Duplicate_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -365,7 +366,7 @@ public void GetNewFilename_multi_Series_S01E05_Extend_Dash_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -399,7 +400,7 @@ public void GetNewFilename_multi_1x05_Repeat_Dash_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -431,7 +432,7 @@ public void GetNewFilename_multi_1x05_Repeat_Dash_Period()
public void GetNewFilename_should_append_proper_when_proper_and_append_quality_is_true()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -456,7 +457,7 @@ public void GetNewFilename_should_append_proper_when_proper_and_append_quality_i
public void GetNewFilename_should_not_append_proper_when_not_proper_and_append_quality_is_true()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -481,7 +482,7 @@ public void GetNewFilename_should_not_append_proper_when_not_proper_and_append_q
public void GetNewFilename_should_not_append_proper_when_proper_and_append_quality_is_false()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -506,7 +507,7 @@ public void GetNewFilename_should_not_append_proper_when_proper_and_append_quali
public void GetNewFilename_should_order_multiple_episode_files_in_numerical_order()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -540,7 +541,7 @@ public void GetNewFilename_Series_Episode_Quality_S01E05_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -567,7 +568,7 @@ public void GetNewFilename_Episode_Quality_1x05_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -592,7 +593,7 @@ public void GetNewFilename_Episode_Quality_1x05_Period()
public void GetNewFilename_UseSceneName_when_sceneName_isNull()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -623,7 +624,7 @@ public void GetNewFilename_UseSceneName_when_sceneName_isNull()
public void GetNewFilename_UseSceneName_when_sceneName_isNotNull()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -654,7 +655,7 @@ public void GetNewFilename_UseSceneName_when_sceneName_isNotNull()
public void should_only_have_one_episodeTitle_when_episode_titles_are_the_same()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -686,7 +687,7 @@ public void should_only_have_one_episodeTitle_when_episode_titles_are_the_same()
public void should_have_two_episodeTitles_when_episode_titles_are_not_the_same()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -718,7 +719,7 @@ public void should_have_two_episodeTitles_when_episode_titles_are_not_the_same()
public void should_have_two_episodeTitles_when_distinct_count_is_two()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -755,7 +756,7 @@ public void should_have_two_episodeTitles_when_distinct_count_is_two()
[Test]
public void should_use_airDate_if_series_isDaily()
{
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -784,7 +785,7 @@ public void should_use_airDate_if_series_isDaily()
[Test]
public void should_use_airDate_if_series_isDaily_no_episode_title()
{
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -813,7 +814,7 @@ public void should_use_airDate_if_series_isDaily_no_episode_title()
[Test]
public void should_set_airdate_to_unknown_if_not_available()
{
var fakeConfig = Mocker.GetMock<ConfigProvider>();
var fakeConfig = Mocker.GetMock<ConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);