diff --git a/NzbDrone.Core.Test/MediaFileProvider_ImportNewDownloadTest.cs b/NzbDrone.Core.Test/MediaFileProvider_ImportNewDownloadTest.cs index 5e2cd840c..530bf3abe 100644 --- a/NzbDrone.Core.Test/MediaFileProvider_ImportNewDownloadTest.cs +++ b/NzbDrone.Core.Test/MediaFileProvider_ImportNewDownloadTest.cs @@ -17,7 +17,7 @@ using NzbDrone.Core.Repository; using NzbDrone.Core.Repository.Quality; using NzbDrone.Core.Test.Framework; -using SubSonic.Repository; +using PetaPoco; namespace NzbDrone.Core.Test { @@ -102,9 +102,9 @@ public void import_new_download_imported() configProvider.SetupGet(c => c.NumberStyle).Returns(2); configProvider.SetupGet(c => c.ReplaceSpaces).Returns(false); - var repo = mocker.GetMock(); - repo.Setup(r => r.Exists(It.IsAny>>())).Returns(false).Verifiable(); - repo.Setup(r => r.Add(It.IsAny())).Returns(1); + var database = mocker.GetMock(); + database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); + database.Setup(r => r.Insert(It.IsAny())).Returns(1); //Act var result = mocker.Resolve().ImportNewFiles(@"C:\Test\30 Rock - 1x05 - Episode Title", series); @@ -142,9 +142,9 @@ public void import_new_download_imported_delete_equal_quality() configProvider.SetupGet(c => c.NumberStyle).Returns(2); configProvider.SetupGet(c => c.ReplaceSpaces).Returns(false); - var repo = mocker.GetMock(); - repo.Setup(r => r.Exists(It.IsAny>>())).Returns(false).Verifiable(); - repo.Setup(r => r.Add(It.IsAny())).Returns(1); + var database = mocker.GetMock(); + database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); + database.Setup(r => r.Insert(It.IsAny())).Returns(1); //Act var result = mocker.Resolve().ImportNewFiles(@"C:\Test\30 Rock - 1x05 - Episode Title", series); @@ -247,9 +247,9 @@ public void import_new_download_imported_delete_lesser_quality_multi_episodes() configProvider.SetupGet(c => c.NumberStyle).Returns(2); configProvider.SetupGet(c => c.ReplaceSpaces).Returns(false); - var repo = mocker.GetMock(); - repo.Setup(r => r.Exists(It.IsAny>>())).Returns(false).Verifiable(); - repo.Setup(r => r.Add(It.IsAny())).Returns(1); + var database = mocker.GetMock(); + database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); + database.Setup(r => r.Insert(It.IsAny())).Returns(1); //Act var result = mocker.Resolve().ImportNewFiles(@"C:\Test\30 Rock - 1x05x06 - Episode Title", series); @@ -292,9 +292,9 @@ public void import_new_download_imported_delete_lesser_quality_multi_episode_fil configProvider.SetupGet(c => c.NumberStyle).Returns(2); configProvider.SetupGet(c => c.ReplaceSpaces).Returns(false); - var repo = mocker.GetMock(); - repo.Setup(r => r.Exists(It.IsAny>>())).Returns(false).Verifiable(); - repo.Setup(r => r.Add(It.IsAny())).Returns(1); + var database = mocker.GetMock(); + database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); + database.Setup(r => r.Insert(It.IsAny())).Returns(1); //Act var result = mocker.Resolve().ImportNewFiles(@"C:\Test\30 Rock - 1x05x06 - Episode Title", series); @@ -395,9 +395,9 @@ public void import_new_download_imported_contains_sample_over_40MB() configProvider.SetupGet(c => c.NumberStyle).Returns(2); configProvider.SetupGet(c => c.ReplaceSpaces).Returns(false); - var repo = mocker.GetMock(); - repo.Setup(r => r.Exists(It.IsAny>>())).Returns(false).Verifiable(); - repo.Setup(r => r.Add(It.IsAny())).Returns(1); + var database = mocker.GetMock(); + database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); + database.Setup(r => r.Insert(It.IsAny())).Returns(1); //Act var result = mocker.Resolve().ImportNewFiles(@"C:\Test\30 Rock - 1x05 - Fourty Samples", series); @@ -435,9 +435,9 @@ public void import_new_download_imported_under_40MB() configProvider.SetupGet(c => c.NumberStyle).Returns(2); configProvider.SetupGet(c => c.ReplaceSpaces).Returns(false); - var repo = mocker.GetMock(); - repo.Setup(r => r.Exists(It.IsAny>>())).Returns(false).Verifiable(); - repo.Setup(r => r.Add(It.IsAny())).Returns(1); + var database = mocker.GetMock(); + database.Setup(r => r.Exists(It.IsAny(), It.IsAny())).Returns(false).Verifiable(); + database.Setup(r => r.Insert(It.IsAny())).Returns(1); //Act var result = mocker.Resolve().ImportNewFiles(@"C:\Test\30 Rock - 1x05 - Episode Title", series);