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
|
@ -25,6 +25,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
{
|
||||
Mocker.GetMock<ConfigProvider>().SetupGet(s => s.ServiceRootUrl)
|
||||
.Returns("http://services.nzbdrone.com");
|
||||
|
||||
WithRealDb();
|
||||
}
|
||||
|
||||
private void WithValidJson()
|
||||
|
@ -75,6 +77,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.With(f => f.SceneName = "laworder")
|
||||
.Build();
|
||||
|
||||
|
||||
Db.Insert(fakeMap);
|
||||
|
||||
//Act
|
||||
|
@ -96,6 +99,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.With(f => f.SceneName = "laworder")
|
||||
.Build();
|
||||
|
||||
|
||||
Db.Insert(fakeMap);
|
||||
|
||||
//Act
|
||||
|
@ -147,6 +151,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.With(f => f.SeasonNumber = -1)
|
||||
.Build();
|
||||
|
||||
|
||||
|
||||
Db.Insert(fakeMap);
|
||||
Db.Insert(fakeMap2);
|
||||
|
||||
|
@ -177,8 +183,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
[Test]
|
||||
public void UpdateMappings_should_add_all_mappings_to_database()
|
||||
{
|
||||
//Setup
|
||||
WithRealDb();
|
||||
WithValidJson();
|
||||
|
||||
//Act
|
||||
|
@ -200,7 +204,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.With(f => f.SceneName = "laworder")
|
||||
.Build();
|
||||
|
||||
WithRealDb();
|
||||
WithValidJson();
|
||||
Db.Insert(fakeMap);
|
||||
|
||||
|
@ -223,7 +226,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.With(f => f.SceneName = "laworder")
|
||||
.Build();
|
||||
|
||||
WithRealDb();
|
||||
WithErrorDownloadingJson();
|
||||
Db.Insert(fakeMap);
|
||||
|
||||
|
@ -246,7 +248,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
.With(f => f.SceneName = "laworder")
|
||||
.Build();
|
||||
|
||||
WithRealDb();
|
||||
Db.Insert(fakeMap);
|
||||
|
||||
//Act
|
||||
|
@ -260,7 +261,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
public void UpdateIfEmpty_should_update_if_count_is_zero()
|
||||
{
|
||||
//Setup
|
||||
WithRealDb();
|
||||
WithValidJson();
|
||||
|
||||
//Act
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue