From 0d51954e92fe8856a5c67ef9789f001eee3cc861 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Tue, 21 Jun 2011 00:25:39 -0700 Subject: [PATCH] fixed broken tests --- NzbDrone.Core.Test/DiskScanProviderTest.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/NzbDrone.Core.Test/DiskScanProviderTest.cs b/NzbDrone.Core.Test/DiskScanProviderTest.cs index 944399e47..b33778588 100644 --- a/NzbDrone.Core.Test/DiskScanProviderTest.cs +++ b/NzbDrone.Core.Test/DiskScanProviderTest.cs @@ -69,10 +69,11 @@ namespace NzbDrone.Core.Test } [TestCase(QualityTypes.SDTV, true)] - [TestCase(QualityTypes.HDTV, true)] - public void import_new_file_with_better_quality(QualityTypes currentFileQuality, bool currentFileProper) + [TestCase(QualityTypes.DVD, true)] + [TestCase(QualityTypes.HDTV, false)] + public void import_new_file_with_better_same_quality(QualityTypes currentFileQuality, bool currentFileProper) { - const string fileName = @"WEEDS.S03E01.DUAL.1080p.-HELLYWOOD.mkv"; + const string newFile = @"WEEDS.S03E01.DUAL.1080p.-HELLYWOOD.mkv"; const int seasonNumber = 3; const int episodeNumner = 1; const int size = 12345; @@ -92,7 +93,7 @@ namespace NzbDrone.Core.Test var mocker = new AutoMoqer(); mocker.GetMock() - .Setup(e => e.GetSize(fileName)).Returns(12345).Verifiable(); + .Setup(e => e.GetSize(newFile)).Returns(12345).Verifiable(); var database = mocker.GetMock(MockBehavior.Strict); database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); @@ -103,7 +104,7 @@ namespace NzbDrone.Core.Test .Setup(e => e.GetEpisode(fakeSeries.SeriesId, seasonNumber, episodeNumner)).Returns(fakeEpisode); //Act - var result = mocker.Resolve().ImportFile(fakeSeries, fileName); + var result = mocker.Resolve().ImportFile(fakeSeries, newFile); //Assert Assert.IsNotNull(result); @@ -113,8 +114,8 @@ namespace NzbDrone.Core.Test result.SeasonNumber.Should().Be(fakeEpisode.SeasonNumber); Assert.AreEqual(fakeEpisode.SeriesId, result.SeriesId); - Assert.AreEqual(QualityTypes.SDTV, result.Quality); - Assert.AreEqual(Parser.NormalizePath(fileName), result.Path); + Assert.AreEqual(QualityTypes.HDTV, result.Quality); + Assert.AreEqual(Parser.NormalizePath(newFile), result.Path); Assert.AreEqual(size, result.Size); Assert.AreEqual(false, result.Proper); Assert.AreNotEqual(new DateTime(), result.DateAdded);