Added a duplicated item to Queue.txt, reformated existing json sample files.

This commit is contained in:
kay.one 2012-01-21 11:36:22 -08:00
commit 5e3e071692
6 changed files with 337 additions and 104 deletions

View file

@ -374,6 +374,33 @@ namespace NzbDrone.Core.Test
parseResults[0].Size.Should().Be(1793148846);
}
[Test]
public void Server_Unavailable_503_should_not_log_exception()
{
Mocker.GetMock<HttpProvider>()
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
.Throws(new WebException("503"));
Mocker.Resolve<NzbsRUs>().FetchRss();
ExceptionVerification.ExpectedErrors(0);
ExceptionVerification.ExpectedWarns(1);
}
[Test]
public void none_503_server_error_should_still_log_error()
{
Mocker.GetMock<HttpProvider>()
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
.Throws(new WebException("some other server error"));
Mocker.Resolve<NzbsRUs>().FetchRss();
ExceptionVerification.ExpectedErrors(1);
ExceptionVerification.ExpectedWarns(0);
}
[TearDown]
public void TearDown()
{