mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-13 10:32:21 +02:00
Fixed broken tests.
Fixed spelling mistake.
This commit is contained in:
parent
842f811ef7
commit
861f6c1a0c
@ -13,6 +13,7 @@
|
||||
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 @@ public class BannerProviderTest : CoreTest
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
WithTempAsAppPath();
|
||||
|
||||
_series = Builder<Series>.CreateNew()
|
||||
.With(s => s.SeriesId = 12345)
|
||||
.Build();
|
||||
@ -97,6 +100,7 @@ public void Delete_should_return_false_when_file_fails_to_delete()
|
||||
|
||||
var result = Mocker.Resolve<BannerProvider>().Delete(1);
|
||||
result.Should().BeFalse();
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
}
|
||||
}
|
@ -34,12 +34,12 @@ public BannerProvider()
|
||||
|
||||
public virtual bool Download(ProgressNotification notification, Series series)
|
||||
{
|
||||
var bannerPath = _environmentProvider.GetBannerPath();
|
||||
//var bannerPath = _environmentProvider.GetBannerPath();
|
||||
|
||||
logger.Trace("Ensuring Banner Folder exists: ", bannerPath);
|
||||
_diskProvider.CreateDirectory(bannerPath);
|
||||
logger.Trace("Ensuring Banner Folder exists: ", _environmentProvider.GetBannerPath());
|
||||
_diskProvider.CreateDirectory(_environmentProvider.GetBannerPath());
|
||||
|
||||
var bannerFilename = Path.Combine(bannerPath, series.SeriesId.ToString()) + ".jpg";
|
||||
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 @@ private static string GetLogsString(IEnumerable<LogEventInfo> logs)
|
||||
|
||||
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 @@ public static void MarkInconclusive(string text)
|
||||
}
|
||||
}
|
||||
|
||||
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
Block a user