From ee285c2d4ad5c43bf5753117094e07f88331519a Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 1 Sep 2014 18:56:42 -0700 Subject: [PATCH] made ImportApprovedEpisodesFixture Os Agnostic --- src/NzbDrone.Core.Test/Framework/CoreTest.cs | 13 ------------- .../MediaFiles/ImportApprovedEpisodesFixture.cs | 6 +++--- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/NzbDrone.Core.Test/Framework/CoreTest.cs b/src/NzbDrone.Core.Test/Framework/CoreTest.cs index 4c9b90803..686964552 100644 --- a/src/NzbDrone.Core.Test/Framework/CoreTest.cs +++ b/src/NzbDrone.Core.Test/Framework/CoreTest.cs @@ -1,7 +1,5 @@ using System.IO; using NUnit.Framework; -using NzbDrone.Common; -using NzbDrone.Common.Disk; using NzbDrone.Common.Http; using NzbDrone.Test.Common; @@ -9,11 +7,6 @@ namespace NzbDrone.Core.Test.Framework { public abstract class CoreTest : TestBase { - protected FileStream OpenRead(params string[] path) - { - return File.OpenRead(Path.Combine(path)); - } - protected string ReadAllText(params string[] path) { return File.ReadAllText(Path.Combine(path)); @@ -23,12 +16,6 @@ namespace NzbDrone.Core.Test.Framework { Mocker.SetConstant(new HttpProvider(TestLogger)); } - -// protected void UseRealDisk() -// { -// Mocker.SetConstant(new DiskProvider()); -// WithTempAsAppPath(); -// } } public abstract class CoreTest : CoreTest where TSubject : class diff --git a/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedEpisodesFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedEpisodesFixture.cs index 2f680ff1d..864569d80 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedEpisodesFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedEpisodesFixture.cs @@ -154,7 +154,7 @@ namespace NzbDrone.Core.Test.MediaFiles [Test] public void should_not_use_nzb_title_as_scene_name_if_full_season() { - _approvedDecisions.First().LocalEpisode.Path = "c:\\tv\\season1\\malcolm.in.the.middle.s02e23.dvdrip.xvid-ingot.mkv"; + _approvedDecisions.First().LocalEpisode.Path = "c:\\tv\\season1\\malcolm.in.the.middle.s02e23.dvdrip.xvid-ingot.mkv".AsOsAgnostic(); _downloadClientItem.Title = "malcolm.in.the.middle.s02.dvdrip.xvid-ingot"; Subject.Import(new List { _approvedDecisions.First() }, true, _downloadClientItem); @@ -166,7 +166,7 @@ namespace NzbDrone.Core.Test.MediaFiles public void should_use_file_name_as_scenename_only_if_it_looks_like_scenename() { - _approvedDecisions.First().LocalEpisode.Path = "c:\\tv\\malcolm.in.the.middle.s02e23.dvdrip.xvid-ingot.mkv"; + _approvedDecisions.First().LocalEpisode.Path = "c:\\tv\\malcolm.in.the.middle.s02e23.dvdrip.xvid-ingot.mkv".AsOsAgnostic(); Subject.Import(new List { _approvedDecisions.First() }, true); @@ -176,7 +176,7 @@ namespace NzbDrone.Core.Test.MediaFiles [Test] public void should_not_use_file_name_as_scenename_if_it_doesnt_looks_like_scenename() { - _approvedDecisions.First().LocalEpisode.Path = "c:\\tv\\aaaaa.mkv"; + _approvedDecisions.First().LocalEpisode.Path = "c:\\tv\\aaaaa.mkv".AsOsAgnostic(); Subject.Import(new List { _approvedDecisions.First() }, true);