1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Using the interface

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

View File

@ -29,7 +29,7 @@ public void Setup()
private void WithAutoIgnore(bool autoIgnore)
{
Mocker.GetMock<ConfigService>()
Mocker.GetMock<IConfigService>()
.SetupGet(c => c.AutoIgnorePreviouslyDownloadedEpisodes).Returns(autoIgnore);
}

View File

@ -39,7 +39,7 @@ public void GetNewFilename_Series_Episode_Quality_S01E05_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -66,7 +66,7 @@ public void GetNewFilename_Episode_Quality_1x05_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -93,7 +93,7 @@ public void GetNewFilename_Series_Quality_01x05_Space()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -120,7 +120,7 @@ public void GetNewFilename_Series_s01e05_Space()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -148,7 +148,7 @@ public void GetNewFilename_Series_Episode_s01e05_Periods()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -175,7 +175,7 @@ public void GetNewFilename_Series_Episode_s01e05_Dash_Periods_Quality()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -202,7 +202,7 @@ public void GetNewFilename_S01E05_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -230,7 +230,7 @@ public void GetNewFilename_multi_Series_Episode_Quality_S01E05_Scene_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -264,7 +264,7 @@ public void GetNewFilename_multi_Episode_Quality_1x05_Repeat_Dash()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -298,7 +298,7 @@ public void GetNewFilename_multi_Episode_Quality_01x05_Repeat_Space()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -332,7 +332,7 @@ public void GetNewFilename_multi_Series_Episode_s01e05_Duplicate_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -366,7 +366,7 @@ public void GetNewFilename_multi_Series_S01E05_Extend_Dash_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -400,7 +400,7 @@ public void GetNewFilename_multi_1x05_Repeat_Dash_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -432,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -457,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -482,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -507,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -541,7 +541,7 @@ public void GetNewFilename_Series_Episode_Quality_S01E05_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -568,7 +568,7 @@ public void GetNewFilename_Episode_Quality_1x05_Period()
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -593,7 +593,7 @@ public void GetNewFilename_Episode_Quality_1x05_Period()
public void GetNewFilename_UseSceneName_when_sceneName_isNull()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -624,7 +624,7 @@ public void GetNewFilename_UseSceneName_when_sceneName_isNull()
public void GetNewFilename_UseSceneName_when_sceneName_isNotNull()
{
//Setup
var fakeConfig = Mocker.GetMock<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -655,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -687,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -719,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -756,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
@ -785,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
@ -814,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<ConfigService>();
var fakeConfig = Mocker.GetMock<IConfigService>();
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true);
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);