|
|
@ -3,7 +3,6 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
using FizzWare.NBuilder;
|
|
|
|
using FizzWare.NBuilder;
|
|
|
|
using FluentAssertions;
|
|
|
|
using FluentAssertions;
|
|
|
|
using Moq;
|
|
|
|
using Moq;
|
|
|
@ -21,13 +20,10 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
public class EpisodeProviderTest_GetEpisodesByParseResult : CoreTest
|
|
|
|
public class EpisodeProviderTest_GetEpisodesByParseResult : CoreTest
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Single_GetSeason_Episode_Exists()
|
|
|
|
public void Single_GetSeason_Episode_Exists()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
WithRealDb();
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeEpisode = Builder<Episode>.CreateNew()
|
|
|
|
var fakeEpisode = Builder<Episode>.CreateNew()
|
|
|
|
.With(e => e.SeriesId = 1)
|
|
|
|
.With(e => e.SeriesId = 1)
|
|
|
@ -37,8 +33,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
|
db.Insert(fakeEpisode);
|
|
|
|
Db.Insert(fakeEpisode);
|
|
|
|
db.Insert(fakeSeries);
|
|
|
|
Db.Insert(fakeSeries);
|
|
|
|
|
|
|
|
|
|
|
|
var parseResult = new EpisodeParseResult
|
|
|
|
var parseResult = new EpisodeParseResult
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -47,7 +43,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 10 }
|
|
|
|
EpisodeNumbers = new List<int> { 10 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().HaveCount(1);
|
|
|
|
ep.Should().HaveCount(1);
|
|
|
|
parseResult.EpisodeTitle.Should().Be(fakeEpisode.Title);
|
|
|
|
parseResult.EpisodeTitle.Should().Be(fakeEpisode.Title);
|
|
|
@ -57,9 +53,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Single_GetSeason_Episode_Doesnt_exists_should_not_add()
|
|
|
|
public void Single_GetSeason_Episode_Doesnt_exists_should_not_add()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
WithRealDb();
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
@ -71,18 +65,16 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 10 }
|
|
|
|
EpisodeNumbers = new List<int> { 10 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().BeEmpty();
|
|
|
|
ep.Should().BeEmpty();
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(0);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Single_GetSeason_Episode_Doesnt_exists_should_add()
|
|
|
|
public void Single_GetSeason_Episode_Doesnt_exists_should_add()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
WithRealDb();
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
@ -94,18 +86,16 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 10 }
|
|
|
|
EpisodeNumbers = new List<int> { 10 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().HaveCount(1);
|
|
|
|
ep.Should().HaveCount(1);
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(1);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Multi_GetSeason_Episode_Exists()
|
|
|
|
public void Multi_GetSeason_Episode_Exists()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
WithRealDb();
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeEpisode = Builder<Episode>.CreateNew()
|
|
|
|
var fakeEpisode = Builder<Episode>.CreateNew()
|
|
|
|
.With(e => e.SeriesId = 1)
|
|
|
|
.With(e => e.SeriesId = 1)
|
|
|
@ -121,9 +111,9 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
|
db.Insert(fakeEpisode);
|
|
|
|
Db.Insert(fakeEpisode);
|
|
|
|
db.Insert(fakeEpisode2);
|
|
|
|
Db.Insert(fakeEpisode2);
|
|
|
|
db.Insert(fakeSeries);
|
|
|
|
Db.Insert(fakeSeries);
|
|
|
|
|
|
|
|
|
|
|
|
var parseResult = new EpisodeParseResult
|
|
|
|
var parseResult = new EpisodeParseResult
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -132,10 +122,10 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 10, 11 }
|
|
|
|
EpisodeNumbers = new List<int> { 10, 11 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().HaveCount(2);
|
|
|
|
ep.Should().HaveCount(2);
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(2);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(2);
|
|
|
|
ep.First().ShouldHave().AllPropertiesBut(e => e.Series);
|
|
|
|
ep.First().ShouldHave().AllPropertiesBut(e => e.Series);
|
|
|
|
parseResult.EpisodeTitle.Should().Be(fakeEpisode.Title);
|
|
|
|
parseResult.EpisodeTitle.Should().Be(fakeEpisode.Title);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -143,9 +133,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Multi_GetSeason_Episode_Doesnt_exists_should_not_add()
|
|
|
|
public void Multi_GetSeason_Episode_Doesnt_exists_should_not_add()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
WithRealDb();
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
@ -157,18 +145,16 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 10, 11 }
|
|
|
|
EpisodeNumbers = new List<int> { 10, 11 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().BeEmpty();
|
|
|
|
ep.Should().BeEmpty();
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(0);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Multi_GetSeason_Episode_Doesnt_exists_should_add()
|
|
|
|
public void Multi_GetSeason_Episode_Doesnt_exists_should_add()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
WithRealDb();
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
@ -180,18 +166,16 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 10, 11 }
|
|
|
|
EpisodeNumbers = new List<int> { 10, 11 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().HaveCount(2);
|
|
|
|
ep.Should().HaveCount(2);
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(2);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Get_Episode_Zero_Doesnt_Exist_Should_add_ignored()
|
|
|
|
public void Get_Episode_Zero_Doesnt_Exist_Should_add_ignored()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
WithRealDb();
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
@ -203,19 +187,17 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 0 }
|
|
|
|
EpisodeNumbers = new List<int> { 0 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().HaveCount(1);
|
|
|
|
ep.Should().HaveCount(1);
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(1);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(1);
|
|
|
|
ep.First().Ignored.Should().BeTrue();
|
|
|
|
ep.First().Ignored.Should().BeTrue();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
public void Get_Multi_Episode_Zero_Doesnt_Exist_Should_not_add_ignored()
|
|
|
|
public void Get_Multi_Episode_Zero_Doesnt_Exist_Should_not_add_ignored()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
WithRealDb();
|
|
|
|
var db = TestDbHelper.GetEmptyDatabase();
|
|
|
|
|
|
|
|
mocker.SetConstant(db);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew().Build();
|
|
|
|
|
|
|
|
|
|
|
@ -227,10 +209,10 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
EpisodeNumbers = new List<int> { 0, 1 }
|
|
|
|
EpisodeNumbers = new List<int> { 0, 1 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var ep = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
var ep = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(parseResult, true);
|
|
|
|
|
|
|
|
|
|
|
|
ep.Should().HaveCount(2);
|
|
|
|
ep.Should().HaveCount(2);
|
|
|
|
db.Fetch<Episode>().Should().HaveCount(2);
|
|
|
|
Db.Fetch<Episode>().Should().HaveCount(2);
|
|
|
|
ep.First().Ignored.Should().BeFalse();
|
|
|
|
ep.First().Ignored.Should().BeFalse();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -238,9 +220,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
[Description("GetEpisodeParseResult should return empty list if episode list is null")]
|
|
|
|
[Description("GetEpisodeParseResult should return empty list if episode list is null")]
|
|
|
|
public void GetEpisodeParseResult_should_return_empty_list_if_episode_list_is_null()
|
|
|
|
public void GetEpisodeParseResult_should_return_empty_list_if_episode_list_is_null()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
|
var episodes = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(new EpisodeParseResult());
|
|
|
|
var episodes = Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(new EpisodeParseResult());
|
|
|
|
//Assert
|
|
|
|
//Assert
|
|
|
|
episodes.Should().NotBeNull();
|
|
|
|
episodes.Should().NotBeNull();
|
|
|
|
episodes.Should().BeEmpty();
|
|
|
|
episodes.Should().BeEmpty();
|
|
|
@ -250,9 +231,9 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
[Description("GetEpisodeParseResult should return empty list if episode list is empty")]
|
|
|
|
[Description("GetEpisodeParseResult should return empty list if episode list is empty")]
|
|
|
|
public void GetEpisodeParseResult_should_return_empty_list_if_episode_list_is_empty()
|
|
|
|
public void GetEpisodeParseResult_should_return_empty_list_if_episode_list_is_empty()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer();
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
|
var episodes = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(new EpisodeParseResult{EpisodeNumbers = new List<int>()});
|
|
|
|
var episodes =
|
|
|
|
|
|
|
|
Mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(new EpisodeParseResult { EpisodeNumbers = new List<int>() });
|
|
|
|
//Assert
|
|
|
|
//Assert
|
|
|
|
episodes.Should().NotBeNull();
|
|
|
|
episodes.Should().NotBeNull();
|
|
|
|
episodes.Should().BeEmpty();
|
|
|
|
episodes.Should().BeEmpty();
|
|
|
@ -272,18 +253,22 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
.With(s => s.SeriesId = 1)
|
|
|
|
.With(s => s.SeriesId = 1)
|
|
|
|
.Build();
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IDatabase>().Setup(s => s.Fetch<Episode, Series, EpisodeFile>(It.IsAny<String>(), It.IsAny<Object[]>()))
|
|
|
|
Mocker.GetMock<IDatabase>().Setup(
|
|
|
|
|
|
|
|
s =>
|
|
|
|
|
|
|
|
s.Fetch<Episode, Series, EpisodeFile>(It.IsAny<String>(),
|
|
|
|
|
|
|
|
It.IsAny<Object[]>()))
|
|
|
|
.Returns(fakeEpisode);
|
|
|
|
.Returns(fakeEpisode);
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
|
var episodes = Mocker.Resolve<EpisodeProvider>()
|
|
|
|
var episodes = Mocker.Resolve<EpisodeProvider>()
|
|
|
|
.GetEpisodesByParseResult(new EpisodeParseResult { AirDate = DateTime.Today, Series = fakeSeries }, true);
|
|
|
|
.GetEpisodesByParseResult(new EpisodeParseResult { AirDate = DateTime.Today, Series = fakeSeries },
|
|
|
|
|
|
|
|
true);
|
|
|
|
|
|
|
|
|
|
|
|
//Assert
|
|
|
|
//Assert
|
|
|
|
episodes.Should().HaveCount(1);
|
|
|
|
episodes.Should().HaveCount(1);
|
|
|
|
episodes.First().AirDate.Should().Be(DateTime.Today);
|
|
|
|
episodes.First().AirDate.Should().Be(DateTime.Today);
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IDatabase>().Verify(v=> v.Insert(It.IsAny<Episode>()), Times.Never());
|
|
|
|
Mocker.GetMock<IDatabase>().Verify(v => v.Insert(It.IsAny<Episode>()), Times.Never());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
@ -298,7 +283,8 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
|
var episodes = Mocker.Resolve<EpisodeProvider>()
|
|
|
|
var episodes = Mocker.Resolve<EpisodeProvider>()
|
|
|
|
.GetEpisodesByParseResult(new EpisodeParseResult { AirDate = DateTime.Today, Series = fakeSeries }, true);
|
|
|
|
.GetEpisodesByParseResult(new EpisodeParseResult { AirDate = DateTime.Today, Series = fakeSeries },
|
|
|
|
|
|
|
|
true);
|
|
|
|
|
|
|
|
|
|
|
|
//Assert
|
|
|
|
//Assert
|
|
|
|
episodes.Should().HaveCount(1);
|
|
|
|
episodes.Should().HaveCount(1);
|
|
|
@ -308,5 +294,24 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
|
|
|
|
|
|
|
|
episodesInDb.Should().HaveCount(1);
|
|
|
|
episodesInDb.Should().HaveCount(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
|
|
|
public void GetEpisodeParseResult_get_daily_should_not_add_new_episode_when_auto_add_is_false()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//Setup
|
|
|
|
|
|
|
|
WithRealDb();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fakeSeries = Builder<Series>.CreateNew()
|
|
|
|
|
|
|
|
.With(s => s.SeriesId = 1)
|
|
|
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
|
|
|
|
var episodes = Mocker.Resolve<EpisodeProvider>()
|
|
|
|
|
|
|
|
.GetEpisodesByParseResult(new EpisodeParseResult { AirDate = DateTime.Today, Series = fakeSeries }, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Assert
|
|
|
|
|
|
|
|
episodes.Should().BeEmpty();
|
|
|
|
|
|
|
|
Db.Fetch<Episode>().Should().BeEmpty();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|