mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
cleaned up CoreTest base class.
This commit is contained in:
parent
77bb790672
commit
64a3e1caf0
12 changed files with 154 additions and 170 deletions
|
@ -37,13 +37,11 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
|
||||
|
||||
var database = TestDbHelper.GetEmptyDatabase();
|
||||
WithRealDb();
|
||||
|
||||
|
||||
database.InsertMany(firstSeriesFiles);
|
||||
database.InsertMany(secondSeriesFiles);
|
||||
|
||||
Mocker.SetConstant(database);
|
||||
Db.InsertMany(firstSeriesFiles);
|
||||
Db.InsertMany(secondSeriesFiles);
|
||||
|
||||
var result = Mocker.Resolve<MediaFileProvider>().GetSeriesFiles(12);
|
||||
|
||||
|
@ -69,13 +67,10 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.Build();
|
||||
|
||||
|
||||
WithRealDb();
|
||||
|
||||
var database = TestDbHelper.GetEmptyDatabase();
|
||||
|
||||
database.InsertMany(firstSeriesFiles);
|
||||
database.InsertMany(secondSeriesFiles);
|
||||
|
||||
Mocker.SetConstant(database);
|
||||
Db.InsertMany(firstSeriesFiles);
|
||||
Db.InsertMany(secondSeriesFiles);
|
||||
|
||||
var result = Mocker.Resolve<MediaFileProvider>().GetSeasonFiles(12, 1);
|
||||
|
||||
|
@ -157,13 +152,12 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.Build();
|
||||
|
||||
|
||||
var database = TestDbHelper.GetEmptyDatabase();
|
||||
Mocker.SetConstant(database);
|
||||
database.InsertMany(episodeFiles);
|
||||
WithRealDb();
|
||||
Db.InsertMany(episodeFiles);
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<MediaFileProvider>().Delete(1);
|
||||
var result = database.Fetch<EpisodeFile>();
|
||||
var result = Db.Fetch<EpisodeFile>();
|
||||
|
||||
//Assert
|
||||
result.Should().HaveCount(9);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue