|
|
@ -95,7 +95,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
.Setup(s => s.GetHistory(0, 20))
|
|
|
|
.Setup(s => s.GetHistory(0, 20))
|
|
|
|
.Returns(new List<HistoryItem>());
|
|
|
|
.Returns(new List<HistoryItem>());
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IHistoryService>()
|
|
|
|
Mocker.GetMock<IHistoryService>()
|
|
|
|
.Verify(s => s.BetweenDates(It.IsAny<DateTime>(), It.IsAny<DateTime>(), HistoryEventType.Grabbed),
|
|
|
|
.Verify(s => s.BetweenDates(It.IsAny<DateTime>(), It.IsAny<DateTime>(), HistoryEventType.Grabbed),
|
|
|
@ -111,7 +111,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
.Setup(s => s.GetHistory(0, 20))
|
|
|
|
.Setup(s => s.GetHistory(0, 20))
|
|
|
|
.Returns(_completed);
|
|
|
|
.Returns(_completed);
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IHistoryService>()
|
|
|
|
Mocker.GetMock<IHistoryService>()
|
|
|
|
.Verify(s => s.BetweenDates(It.IsAny<DateTime>(), It.IsAny<DateTime>(), HistoryEventType.Grabbed),
|
|
|
|
.Verify(s => s.BetweenDates(It.IsAny<DateTime>(), It.IsAny<DateTime>(), HistoryEventType.Grabbed),
|
|
|
@ -126,7 +126,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
GivenNoGrabbedHistory();
|
|
|
|
GivenNoGrabbedHistory();
|
|
|
|
GivenFailedDownloadClientHistory();
|
|
|
|
GivenFailedDownloadClientHistory();
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
VerifyNoFailedDownloads();
|
|
|
|
VerifyNoFailedDownloads();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -146,7 +146,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
history.First().Data.Add("downloadClient", "SabnzbdClient");
|
|
|
|
history.First().Data.Add("downloadClient", "SabnzbdClient");
|
|
|
|
history.First().Data.Add("downloadClientId", _failed.First().Id);
|
|
|
|
history.First().Data.Add("downloadClientId", _failed.First().Id);
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
VerifyNoFailedDownloads();
|
|
|
|
VerifyNoFailedDownloads();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -166,7 +166,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
history.First().Data.Add("downloadClient", "SabnzbdClient");
|
|
|
|
history.First().Data.Add("downloadClient", "SabnzbdClient");
|
|
|
|
history.First().Data.Add("downloadClientId", _failed.First().Id);
|
|
|
|
history.First().Data.Add("downloadClientId", _failed.First().Id);
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
VerifyFailedDownloads();
|
|
|
|
VerifyFailedDownloads();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -189,7 +189,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
h.Data.Add("downloadClientId", _failed.First().Id);
|
|
|
|
h.Data.Add("downloadClientId", _failed.First().Id);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
VerifyFailedDownloads(2);
|
|
|
|
VerifyFailedDownloads(2);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -201,7 +201,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
.SetupGet(s => s.EnableFailedDownloadHandling)
|
|
|
|
.SetupGet(s => s.EnableFailedDownloadHandling)
|
|
|
|
.Returns(false);
|
|
|
|
.Returns(false);
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Execute(new FailedDownloadCommand());
|
|
|
|
Subject.Execute(new CheckForFailedDownloadCommand());
|
|
|
|
|
|
|
|
|
|
|
|
VerifyNoFailedDownloads();
|
|
|
|
VerifyNoFailedDownloads();
|
|
|
|
}
|
|
|
|
}
|
|
|
|