mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Removed duplicate test.
This commit is contained in:
parent
66b4b094f9
commit
4b31b5b693
1 changed files with 0 additions and 33 deletions
|
@ -1539,39 +1539,6 @@ namespace NzbDrone.Core.Test
|
|||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(SqlCeException))]
|
||||
public void SetPostDownloadStatus_No_EpisodeId_In_Database()
|
||||
{
|
||||
var db = MockLib.GetEmptyDatabase();
|
||||
var mocker = new AutoMoqer();
|
||||
mocker.SetConstant(db);
|
||||
|
||||
var postDownloadStatus = PostDownloadStatusType.Failed;
|
||||
|
||||
var fakeSeries = Builder<Series>.CreateNew()
|
||||
.With(s => s.SeriesId = 12345)
|
||||
.With(s => s.CleanTitle = "officeus")
|
||||
.Build();
|
||||
|
||||
var fakeEpisodes = Builder<Episode>.CreateListOfSize(1)
|
||||
.WhereAll()
|
||||
.Have(c => c.SeriesId = 12345)
|
||||
.Have(c => c.SeasonNumber = 1)
|
||||
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
|
||||
.Build();
|
||||
|
||||
db.Insert(fakeSeries);
|
||||
db.InsertMany(fakeEpisodes);
|
||||
|
||||
mocker.GetMock<SeriesProvider>().Setup(s => s.FindSeries("officeus")).Returns(fakeSeries);
|
||||
|
||||
//Act
|
||||
mocker.Resolve<EpisodeProvider>().SetPostDownloadStatus(new List<int>(), postDownloadStatus);
|
||||
|
||||
//Assert
|
||||
var result = db.Fetch<Episode>();
|
||||
result.Where(e => e.PostDownloadStatus == postDownloadStatus).Count().Should().Be(0);
|
||||
}
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void SetPostDownloadStatus_should_throw_if_episode_list_is_empty()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue