From 10d526d003814e2298c9bfe7e5a6de391d643954 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 15 Sep 2011 23:01:31 -0700 Subject: [PATCH] Fixed broken test that was using app relative path. --- NzbDrone.Core.Test/BannerDownloadJobTest.cs | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/NzbDrone.Core.Test/BannerDownloadJobTest.cs b/NzbDrone.Core.Test/BannerDownloadJobTest.cs index 35a85ede1..e81c79db1 100644 --- a/NzbDrone.Core.Test/BannerDownloadJobTest.cs +++ b/NzbDrone.Core.Test/BannerDownloadJobTest.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using AutoMoq; using FizzWare.NBuilder; using FluentAssertions; @@ -94,7 +95,7 @@ namespace NzbDrone.Core.Test var fakeSeries = Builder.CreateListOfSize(10) .Build(); - const string path = @"C:\Users\mark.mcdowall\Dropbox\Visual Studio 2010\NzbDrone\NzbDrone.Core.Test\bin\Debug\Content\Images\Banners\"; + var path = Path.Combine(CentralDispatch.AppPath, "Content", "Images", "Banners"); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -105,43 +106,43 @@ namespace NzbDrone.Core.Test .Returns(fakeSeries); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "1.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "1.jpg"))) .Returns(false); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "2.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "2.jpg"))) .Returns(true); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "3.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "3.jpg"))) .Returns(false); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "4.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "4.jpg"))) .Returns(true); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "5.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "5.jpg"))) .Returns(false); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "6.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "6.jpg"))) .Returns(true); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "7.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "7.jpg"))) .Returns(false); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "8.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "8.jpg"))) .Returns(true); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "9.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "9.jpg"))) .Returns(false); mocker.GetMock() - .Setup(s => s.DownloadFile(It.IsAny(), path + "10.jpg")) + .Setup(s => s.DownloadFile(It.IsAny(), Path.Combine(path, "10.jpg"))) .Returns(true); mocker.GetMock()