mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
fixed more tests.
This commit is contained in:
parent
a98d792c0d
commit
9931bab998
51 changed files with 184 additions and 169 deletions
|
@ -28,13 +28,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
public void should_not_move_file_if_source_and_destination_are_the_same_path()
|
||||
{
|
||||
var fakeSeries = Builder<Series>.CreateNew()
|
||||
.With(s => s.SeriesId = 5)
|
||||
.With(s => s.OID = 5)
|
||||
.With(s => s.Title = "30 Rock")
|
||||
.Build();
|
||||
|
||||
var fakeEpisode = Builder<Episode>.CreateListOfSize(1)
|
||||
.All()
|
||||
.With(e => e.SeriesId = fakeSeries.SeriesId)
|
||||
.With(e => e.SeriesId = fakeSeries.OID)
|
||||
.With(e => e.SeasonNumber = 1)
|
||||
.With(e => e.EpisodeNumber = 1)
|
||||
.Build();
|
||||
|
@ -43,12 +43,12 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
var fi = new FileInfo(Path.Combine(@"C:\Test\TV\30 Rock\Season 01\", filename + ".avi"));
|
||||
|
||||
var file = Builder<EpisodeFile>.CreateNew()
|
||||
.With(f => f.SeriesId = fakeSeries.SeriesId)
|
||||
.With(f => f.SeriesId = fakeSeries.OID)
|
||||
.With(f => f.Path = fi.FullName)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<ISeriesRepository>()
|
||||
.Setup(e => e.Get(fakeSeries.SeriesId))
|
||||
.Setup(e => e.Get(fakeSeries.OID))
|
||||
.Returns(fakeSeries);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
|
@ -74,13 +74,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
public void should_use_EpisodeFiles_quality()
|
||||
{
|
||||
var fakeSeries = Builder<Series>.CreateNew()
|
||||
.With(s => s.SeriesId = 5)
|
||||
.With(s => s.OID = 5)
|
||||
.With(s => s.Title = "30 Rock")
|
||||
.Build();
|
||||
|
||||
var fakeEpisode = Builder<Episode>.CreateListOfSize(1)
|
||||
.All()
|
||||
.With(e => e.SeriesId = fakeSeries.SeriesId)
|
||||
.With(e => e.SeriesId = fakeSeries.OID)
|
||||
.With(e => e.SeasonNumber = 1)
|
||||
.With(e => e.EpisodeNumber = 1)
|
||||
.Build();
|
||||
|
@ -91,14 +91,14 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
const string message = "30 Rock - 1x01 - [WEBDL]";
|
||||
|
||||
var file = Builder<EpisodeFile>.CreateNew()
|
||||
.With(f => f.SeriesId = fakeSeries.SeriesId)
|
||||
.With(f => f.SeriesId = fakeSeries.OID)
|
||||
.With(f => f.Path = currentFilename)
|
||||
.With(f => f.Quality = QualityTypes.WEBDL720p)
|
||||
.With(f => f.Proper = false)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<ISeriesRepository>()
|
||||
.Setup(e => e.Get(fakeSeries.SeriesId))
|
||||
.Setup(e => e.Get(fakeSeries.OID))
|
||||
.Returns(fakeSeries);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
|
@ -133,13 +133,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
public void should_log_error_and_return_null_when_source_file_does_not_exists()
|
||||
{
|
||||
var fakeSeries = Builder<Series>.CreateNew()
|
||||
.With(s => s.SeriesId = 5)
|
||||
.With(s => s.OID = 5)
|
||||
.With(s => s.Title = "30 Rock")
|
||||
.Build();
|
||||
|
||||
var fakeEpisode = Builder<Episode>.CreateListOfSize(1)
|
||||
.All()
|
||||
.With(e => e.SeriesId = fakeSeries.SeriesId)
|
||||
.With(e => e.SeriesId = fakeSeries.OID)
|
||||
.With(e => e.SeasonNumber = 1)
|
||||
.With(e => e.EpisodeNumber = 1)
|
||||
.Build();
|
||||
|
@ -150,14 +150,14 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
const string message = "30 Rock - 1x01 - [WEBDL]";
|
||||
|
||||
var file = Builder<EpisodeFile>.CreateNew()
|
||||
.With(f => f.SeriesId = fakeSeries.SeriesId)
|
||||
.With(f => f.SeriesId = fakeSeries.OID)
|
||||
.With(f => f.Path = currentFilename)
|
||||
.With(f => f.Quality = QualityTypes.WEBDL720p)
|
||||
.With(f => f.Proper = false)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<ISeriesRepository>()
|
||||
.Setup(e => e.Get(fakeSeries.SeriesId))
|
||||
.Setup(e => e.Get(fakeSeries.OID))
|
||||
.Returns(fakeSeries);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue