mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
removed sqlce
This commit is contained in:
parent
b76c6329fe
commit
beb2f7c7fd
105 changed files with 410 additions and 5340 deletions
|
@ -13,46 +13,15 @@ namespace NzbDrone.Core.Test.TvTests
|
|||
{
|
||||
[TestFixture]
|
||||
// ReSharper disable InconsistentNaming
|
||||
public class SeasonProviderTest : SqlCeTest
|
||||
public class SeasonProviderTest : ObjectDbTest
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
WithRealDb();
|
||||
|
||||
}
|
||||
|
||||
|
||||
[TestCase(true)]
|
||||
[TestCase(false)]
|
||||
public void SetIgnore_should_update_ignored_status(bool ignoreFlag)
|
||||
{
|
||||
var fakeSeason = Builder<Season>.CreateNew()
|
||||
.With(s => s.Ignored = !ignoreFlag)
|
||||
.Build();
|
||||
|
||||
var fakeEpisodes = Builder<Episode>.CreateListOfSize(4)
|
||||
.All()
|
||||
.With(c => c.SeriesId = fakeSeason.SeriesId)
|
||||
.With(c => c.SeasonNumber = fakeSeason.Id)
|
||||
.With(c => c.Ignored = !ignoreFlag)
|
||||
.Build().ToList();
|
||||
|
||||
fakeEpisodes.ForEach(c => Db.Insert(c));
|
||||
|
||||
var id = Db.Insert(fakeSeason);
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<ISeasonService>().SetIgnore(fakeSeason.SeriesId, fakeSeason.SeasonNumber, ignoreFlag);
|
||||
|
||||
//Assert
|
||||
var season = Db.SingleOrDefault<Season>(id);
|
||||
season.Ignored.Should().Be(ignoreFlag);
|
||||
|
||||
var episodes = Db.Fetch<Episode>();
|
||||
episodes.Should().HaveSameCount(fakeEpisodes);
|
||||
episodes.Should().OnlyContain(c => c.Ignored == ignoreFlag);
|
||||
}
|
||||
|
||||
[TestCase(true)]
|
||||
[TestCase(false)]
|
||||
public void IsIgnored_should_return_ignored_status_of_season(bool ignoreFlag)
|
||||
|
@ -111,7 +80,7 @@ namespace NzbDrone.Core.Test.TvTests
|
|||
const int seriesId = 10;
|
||||
|
||||
//Setup
|
||||
WithRealDb();
|
||||
|
||||
|
||||
var seasons = Builder<Season>.CreateListOfSize(5)
|
||||
.All()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue