parent
842f811ef7
commit
861f6c1a0c
|
@ -13,6 +13,7 @@ using NzbDrone.Core.Repository;
|
|||
using NzbDrone.Core.Repository.Quality;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common.AutoMoq;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.ProviderTests
|
||||
{
|
||||
|
@ -26,6 +27,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
WithTempAsAppPath();
|
||||
|
||||
_series = Builder<Series>.CreateNew()
|
||||
.With(s => s.SeriesId = 12345)
|
||||
.Build();
|
||||
|
@ -97,6 +100,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
var result = Mocker.Resolve<BannerProvider>().Delete(1);
|
||||
result.Should().BeFalse();
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,12 +34,12 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
public virtual bool Download(ProgressNotification notification, Series series)
|
||||
{
|
||||
var bannerPath = _environmentProvider.GetBannerPath();
|
||||
|
||||
logger.Trace("Ensuring Banner Folder exists: ", bannerPath);
|
||||
_diskProvider.CreateDirectory(bannerPath);
|
||||
//var bannerPath = _environmentProvider.GetBannerPath();
|
||||
|
||||
var bannerFilename = Path.Combine(bannerPath, series.SeriesId.ToString()) + ".jpg";
|
||||
logger.Trace("Ensuring Banner Folder exists: ", _environmentProvider.GetBannerPath());
|
||||
_diskProvider.CreateDirectory(_environmentProvider.GetBannerPath());
|
||||
|
||||
var bannerFilename = Path.Combine(_environmentProvider.GetBannerPath(), series.SeriesId.ToString()) + ".jpg";
|
||||
|
||||
notification.CurrentMessage = string.Format("Downloading banner for '{0}'", series.Title);
|
||||
logger.Trace("Downloading banner for '{0}'", series.Title);
|
||||
|
|
|
@ -51,17 +51,17 @@ namespace NzbDrone.Test.Common
|
|||
|
||||
public static void ExpectedErrors(int count)
|
||||
{
|
||||
Excpected(LogLevel.Error, count);
|
||||
Expected(LogLevel.Error, count);
|
||||
}
|
||||
|
||||
public static void ExpectedFatals(int count)
|
||||
{
|
||||
Excpected(LogLevel.Fatal, count);
|
||||
Expected(LogLevel.Fatal, count);
|
||||
}
|
||||
|
||||
public static void ExpectedWarns(int count)
|
||||
{
|
||||
Excpected(LogLevel.Warn, count);
|
||||
Expected(LogLevel.Warn, count);
|
||||
}
|
||||
|
||||
public static void IgnoreWarns()
|
||||
|
@ -96,7 +96,7 @@ namespace NzbDrone.Test.Common
|
|||
}
|
||||
}
|
||||
|
||||
private static void Excpected(LogLevel level, int count)
|
||||
private static void Expected(LogLevel level, int count)
|
||||
{
|
||||
var levelLogs = _logs.Where(l => l.Level == level).ToList();
|
||||
|
||||
|
|
Loading…
Reference in New Issue