Fixed broken tests.

Fixed spelling mistake.
pull/4/head
Mark McDowall 12 years ago
parent 842f811ef7
commit 861f6c1a0c

@ -13,6 +13,7 @@ using NzbDrone.Core.Repository;
using NzbDrone.Core.Repository.Quality; using NzbDrone.Core.Repository.Quality;
using NzbDrone.Core.Test.Framework; using NzbDrone.Core.Test.Framework;
using NzbDrone.Test.Common.AutoMoq; using NzbDrone.Test.Common.AutoMoq;
using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test.ProviderTests namespace NzbDrone.Core.Test.ProviderTests
{ {
@ -26,6 +27,8 @@ namespace NzbDrone.Core.Test.ProviderTests
[SetUp] [SetUp]
public void Setup() public void Setup()
{ {
WithTempAsAppPath();
_series = Builder<Series>.CreateNew() _series = Builder<Series>.CreateNew()
.With(s => s.SeriesId = 12345) .With(s => s.SeriesId = 12345)
.Build(); .Build();
@ -97,6 +100,7 @@ namespace NzbDrone.Core.Test.ProviderTests
var result = Mocker.Resolve<BannerProvider>().Delete(1); var result = Mocker.Resolve<BannerProvider>().Delete(1);
result.Should().BeFalse(); result.Should().BeFalse();
ExceptionVerification.ExpectedWarns(1);
} }
} }
} }

@ -34,12 +34,12 @@ namespace NzbDrone.Core.Providers
public virtual bool Download(ProgressNotification notification, Series series) public virtual bool Download(ProgressNotification notification, Series series)
{ {
var bannerPath = _environmentProvider.GetBannerPath(); //var bannerPath = _environmentProvider.GetBannerPath();
logger.Trace("Ensuring Banner Folder exists: ", bannerPath); logger.Trace("Ensuring Banner Folder exists: ", _environmentProvider.GetBannerPath());
_diskProvider.CreateDirectory(bannerPath); _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); notification.CurrentMessage = string.Format("Downloading banner for '{0}'", series.Title);
logger.Trace("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) public static void ExpectedErrors(int count)
{ {
Excpected(LogLevel.Error, count); Expected(LogLevel.Error, count);
} }
public static void ExpectedFatals(int count) public static void ExpectedFatals(int count)
{ {
Excpected(LogLevel.Fatal, count); Expected(LogLevel.Fatal, count);
} }
public static void ExpectedWarns(int count) public static void ExpectedWarns(int count)
{ {
Excpected(LogLevel.Warn, count); Expected(LogLevel.Warn, count);
} }
public static void IgnoreWarns() 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(); var levelLogs = _logs.Where(l => l.Level == level).ToList();

Loading…
Cancel
Save