mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Fixed tests and missing logger initialization
This commit is contained in:
parent
3564be19a8
commit
1e80361c3a
@ -7,6 +7,7 @@
|
|||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Tv;
|
||||||
using FizzWare.NBuilder;
|
using FizzWare.NBuilder;
|
||||||
|
using NzbDrone.Core.Download;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.Download.TrackedDownloads
|
namespace NzbDrone.Core.Test.Download.TrackedDownloads
|
||||||
{
|
{
|
||||||
@ -26,8 +27,12 @@ public void Setup()
|
|||||||
.With(r => r.Episodes = _episodes)
|
.With(r => r.Episodes = _episodes)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
var downloadItem = Builder<DownloadClientItem>.CreateNew()
|
||||||
|
.Build();
|
||||||
|
|
||||||
_trackedDownload = Builder<TrackedDownload>.CreateNew()
|
_trackedDownload = Builder<TrackedDownload>.CreateNew()
|
||||||
.With(t => t.RemoteEpisode = remoteEpisode)
|
.With(t => t.RemoteEpisode = remoteEpisode)
|
||||||
|
.With(t => t.DownloadItem = downloadItem)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
_historyItems = new List<EpisodeHistory>();
|
_historyItems = new List<EpisodeHistory>();
|
||||||
|
@ -150,7 +150,7 @@ public void should_not_change_monitored_status_for_existing_episodes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_not_set_monitored_status_for_old_episodes_to_false_if_recent_enough()
|
public void should_not_set_monitored_status_for_old_episodes_to_false_if_episodes_existed()
|
||||||
{
|
{
|
||||||
var series = GetSeries();
|
var series = GetSeries();
|
||||||
series.Seasons = new List<Season>();
|
series.Seasons = new List<Season>();
|
||||||
@ -176,6 +176,8 @@ public void should_not_set_monitored_status_for_old_episodes_to_false_if_recent_
|
|||||||
_insertedEpisodes[1].Monitored.Should().Be(true);
|
_insertedEpisodes[1].Monitored.Should().Be(true);
|
||||||
_insertedEpisodes[2].Monitored.Should().Be(true);
|
_insertedEpisodes[2].Monitored.Should().Be(true);
|
||||||
_insertedEpisodes[3].Monitored.Should().Be(true);
|
_insertedEpisodes[3].Monitored.Should().Be(true);
|
||||||
|
|
||||||
|
ExceptionVerification.ExpectedWarns(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -46,6 +46,7 @@ public CompletedDownloadService(IEventAggregator eventAggregator,
|
|||||||
_parsingService = parsingService;
|
_parsingService = parsingService;
|
||||||
_seriesService = seriesService;
|
_seriesService = seriesService;
|
||||||
_trackedDownloadAlreadyImported = trackedDownloadAlreadyImported;
|
_trackedDownloadAlreadyImported = trackedDownloadAlreadyImported;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Check(TrackedDownload trackedDownload)
|
public void Check(TrackedDownload trackedDownload)
|
||||||
|
Loading…
Reference in New Issue
Block a user