|
|
|
@ -180,7 +180,7 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_not_attempt_download_if_client_isnt_configure()
|
|
|
|
|
public void should_not_attempt_download_if_client_isnt_configured()
|
|
|
|
|
{
|
|
|
|
|
Assert.Throws<DownloadClientUnavailableException>(() => Subject.DownloadReport(_parseResult));
|
|
|
|
|
|
|
|
|
@ -188,6 +188,21 @@ namespace NzbDrone.Core.Test.Download
|
|
|
|
|
VerifyEventNotPublished<AlbumGrabbedEvent>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_not_attempt_download_if_client_is_disabled()
|
|
|
|
|
{
|
|
|
|
|
WithUsenetClient();
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IDownloadClientStatusService>()
|
|
|
|
|
.Setup(v => v.IsDisabled(It.IsAny<int>()))
|
|
|
|
|
.Returns(true);
|
|
|
|
|
|
|
|
|
|
Assert.Throws<DownloadClientUnavailableException>(() => Subject.DownloadReport(_parseResult));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IDownloadClient>().Verify(c => c.Download(It.IsAny<RemoteAlbum>()), Times.Never());
|
|
|
|
|
VerifyEventNotPublished<AlbumGrabbedEvent>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_send_download_to_correct_usenet_client()
|
|
|
|
|
{
|
|
|
|
|