Merge branch 'kay.one' of github.com:NzbDrone/NzbDrone into markus

pull/2/head
Mark McDowall 13 years ago
commit f6e14b51f6

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -35,7 +35,7 @@
<Reference Include="FizzWare.NBuilder"> <Reference Include="FizzWare.NBuilder">
<HintPath>..\packages\NBuilder.3.0.1\lib\FizzWare.NBuilder.dll</HintPath> <HintPath>..\packages\NBuilder.3.0.1\lib\FizzWare.NBuilder.dll</HintPath>
</Reference> </Reference>
<Reference Include="FluentAssertions"> <Reference Include="FluentAssertions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.1.5.0.0\Lib\.NetFramework 4.0\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.1.5.0.0\Lib\.NetFramework 4.0\FluentAssertions.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Practices.ServiceLocation"> <Reference Include="Microsoft.Practices.ServiceLocation">

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="CommonServiceLocator" version="1.0" /> <package id="CommonServiceLocator" version="1.0" />
<package id="FluentAssertions" version="1.5.0.0" />
<package id="Moq" version="4.0.10827" /> <package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1" /> <package id="NBuilder" version="3.0.1" />
<package id="Ninject" version="2.2.1.4" /> <package id="Ninject" version="2.2.1.4" />
<package id="NUnit" version="2.5.10.11092" /> <package id="NUnit" version="2.5.10.11092" />
<package id="Unity" version="2.1.505.0" /> <package id="Unity" version="2.1.505.0" />
<package id="FluentAssertions" version="1.5.0.0" />
</packages> </packages>

@ -102,9 +102,9 @@ namespace NzbDrone.Core.Test
var notification = new ProgressNotification("Backlog Search Job Test"); var notification = new ProgressNotification("Backlog Search Job Test");
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -116,7 +116,7 @@ namespace NzbDrone.Core.Test
.Setup(s => s.Start(notification, It.IsAny<int>(), 0)).Verifiable(); .Setup(s => s.Start(notification, It.IsAny<int>(), 0)).Verifiable();
mocker.GetMock<EpisodeProvider>() mocker.GetMock<EpisodeProvider>()
.Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(new List<int> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}); .Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
//Act //Act
mocker.Resolve<BacklogSearchJob>().Start(notification, 0, 0); mocker.Resolve<BacklogSearchJob>().Start(notification, 0, 0);
@ -136,9 +136,9 @@ namespace NzbDrone.Core.Test
var notification = new ProgressNotification("Backlog Search Job Test"); var notification = new ProgressNotification("Backlog Search Job Test");
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -170,9 +170,9 @@ namespace NzbDrone.Core.Test
var notification = new ProgressNotification("Backlog Search Job Test"); var notification = new ProgressNotification("Backlog Search Job Test");
var episodes = Builder<Episode>.CreateListOfSize(10) var episodes = Builder<Episode>.CreateListOfSize(10)
.WhereTheFirst(5) .TheFirst(5)
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -187,7 +187,7 @@ namespace NzbDrone.Core.Test
.Setup(s => s.Start(notification, It.IsAny<int>(), 0)).Verifiable(); .Setup(s => s.Start(notification, It.IsAny<int>(), 0)).Verifiable();
mocker.GetMock<EpisodeProvider>() mocker.GetMock<EpisodeProvider>()
.Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(new List<int>{ 1, 2, 3, 4, 5 }); .Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(new List<int> { 1, 2, 3, 4, 5 });
//Act //Act
mocker.Resolve<BacklogSearchJob>().Start(notification, 0, 0); mocker.Resolve<BacklogSearchJob>().Start(notification, 0, 0);

@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test
//Setup //Setup
var fakeSeries = Builder<Series>.CreateListOfSize(10) var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereRandom(2) .WhereRandom(2)
.Have(s => s.BannerUrl = null) .With(s => s.BannerUrl = null)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);

@ -48,7 +48,7 @@ namespace NzbDrone.Core.Test
public void job_with_no_target_should_scan_all_series() public void job_with_no_target_should_scan_all_series()
{ {
var series = Builder<Series>.CreateListOfSize(2) var series = Builder<Series>.CreateListOfSize(2)
.WhereTheFirst(1).Has(s => s.SeriesId = 12) .TheFirst(1).Has(s => s.SeriesId = 12)
.AndTheNext(1).Has(s => s.SeriesId = 15) .AndTheNext(1).Has(s => s.SeriesId = 15)
.Build(); .Build();
@ -76,7 +76,7 @@ namespace NzbDrone.Core.Test
public void failed_scan_should_not_terminated_job() public void failed_scan_should_not_terminated_job()
{ {
var series = Builder<Series>.CreateListOfSize(2) var series = Builder<Series>.CreateListOfSize(2)
.WhereTheFirst(1).Has(s => s.SeriesId = 12) .TheFirst(1).Has(s => s.SeriesId = 12)
.AndTheNext(1).Has(s => s.SeriesId = 15) .AndTheNext(1).Has(s => s.SeriesId = 15)
.Build(); .Build();
@ -105,7 +105,7 @@ namespace NzbDrone.Core.Test
public void job_with_no_target_should_scan_series_with_episodes() public void job_with_no_target_should_scan_series_with_episodes()
{ {
var series = Builder<Series>.CreateListOfSize(2) var series = Builder<Series>.CreateListOfSize(2)
.WhereTheFirst(1).Has(s => s.SeriesId = 12) .TheFirst(1).Has(s => s.SeriesId = 12)
.AndTheNext(1).Has(s => s.SeriesId = 15) .AndTheNext(1).Has(s => s.SeriesId = 15)
.Build(); .Build();

@ -254,8 +254,8 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.EpisodeFile = Builder<EpisodeFile>.CreateNew() .With(e => e.EpisodeFile = Builder<EpisodeFile>.CreateNew()
.With(f => f.Quality = QualityTypes.SDTV) .With(f => f.Quality = QualityTypes.SDTV)
.Build()) .Build())
.Build(); .Build();
@ -289,8 +289,8 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.EpisodeFile = Builder<EpisodeFile>.CreateNew() .With(e => e.EpisodeFile = Builder<EpisodeFile>.CreateNew()
.With(f => f.Quality = QualityTypes.Bluray720p) .With(f => f.Quality = QualityTypes.Bluray720p)
.Build()) .Build())
.Build(); .Build();
@ -324,8 +324,8 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.Quality = QualityTypes.SDTV) .With(e => e.Quality = QualityTypes.SDTV)
.Build(); .Build();
var fakeEpisode1 = Builder<Episode>.CreateNew() var fakeEpisode1 = Builder<Episode>.CreateNew()

@ -25,9 +25,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(2) var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereTheFirst(1).Has(s => s.EpisodeId = 12) .TheFirst(1).Has(s => s.EpisodeId = 12)
.AndTheNext(1).Has(s => s.EpisodeId = 99) .AndTheNext(1).Has(s => s.EpisodeId = 99)
.WhereAll().Has(s => s.SeriesId = 5) .All().Has(s => s.SeriesId = 5)
.Build(); .Build();

@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).Have(e => e.EpisodeFileId = 0).Build(); .All().With(e => e.SeriesId = 1).With(e => e.EpisodeFileId = 0).Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -98,7 +98,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build(); var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).WhereTheFirst(1).Have(e => e.EpisodeFileId = 1).Have(e => e.EpisodeFile = fakeFile).Build(); .All().With(e => e.SeriesId = 1).TheFirst(1).With(e => e.EpisodeFileId = 1).With(e => e.EpisodeFile = fakeFile).Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -124,7 +124,7 @@ namespace NzbDrone.Core.Test
mocker.Resolve<SeriesProvider>(); mocker.Resolve<SeriesProvider>();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).Build(); .All().With(e => e.SeriesId = 1).Build();
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -154,7 +154,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().With(s => s.SeriesId = 12).Build(); var fakeSeries = Builder<Series>.CreateNew().With(s => s.SeriesId = 12).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 12).Build(); .All().With(e => e.SeriesId = 12).Build();
mocker.GetMock<SeriesProvider>() mocker.GetMock<SeriesProvider>()
.Setup(c => c.GetSeries(12)) .Setup(c => c.GetSeries(12))
@ -225,9 +225,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(10) var episodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll().Have(c => c.SeriesId = 12) .All().With(c => c.SeriesId = 12).And(c => c.SeasonNumber = 2)
.WhereTheFirst(5).Have(c => c.SeasonNumber = 1) .TheFirst(5).With(c => c.SeasonNumber = 1)
.AndTheRemaining().Have(c => c.SeasonNumber = 2).Build(); .Build();
var db = MockLib.GetEmptyDatabase(); var db = MockLib.GetEmptyDatabase();
var mocker = new AutoMoqer(); var mocker = new AutoMoqer();
@ -254,8 +254,8 @@ namespace NzbDrone.Core.Test
var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With( var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();
@ -293,10 +293,9 @@ namespace NzbDrone.Core.Test
var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With( var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(10). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(10).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a")).And(e => e.FirstAired = DateTime.Now)
.WhereTheFirst(7).Have(e => e.FirstAired = new DateTime(1800, 1, 1)) .TheFirst(7).With(e => e.FirstAired = new DateTime(1800, 1, 1))
.AndTheRemaining().Have(e => e.FirstAired = DateTime.Now)
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();
@ -336,9 +335,9 @@ namespace NzbDrone.Core.Test
var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With( var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.WhereTheFirst(1) .TheFirst(1)
.Has(e => e.EpisodeNumber = 0) .Has(e => e.EpisodeNumber = 0)
.Has(e => e.SeasonNumber = 15) .Has(e => e.SeasonNumber = 15)
.Build()) .Build())
@ -447,7 +446,7 @@ namespace NzbDrone.Core.Test
.With(c => c.Id = seriesId) .With(c => c.Id = seriesId)
.With(c => c.Episodes = new List<TvdbEpisode>( .With(c => c.Episodes = new List<TvdbEpisode>(
Builder<TvdbEpisode>.CreateListOfSize(1) Builder<TvdbEpisode>.CreateListOfSize(1)
.WhereAll().Have(g => g.Id = 99) .All().With(g => g.Id = 99)
.Build()) .Build())
) )
.Build(); .Build();
@ -565,10 +564,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 2) .With(c => c.SeasonNumber = 2)
.Build(); .Build();
episodes.ToList().ForEach(c => db.Insert(c)); episodes.ToList().ForEach(c => db.Insert(c));
@ -588,10 +587,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 2) .With(c => c.SeasonNumber = 2)
.Build(); .Build();
episodes.ToList().ForEach(c => db.Insert(c)); episodes.ToList().ForEach(c => db.Insert(c));
@ -611,10 +610,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 2) .With(c => c.SeasonNumber = 2)
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Build(); .Build();
episodes[2].Ignored = false; episodes[2].Ignored = false;
@ -637,10 +636,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 3) .With(c => c.SeasonNumber = 3)
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Build(); .Build();
episodes.ToList().ForEach(c => db.Insert(c)); episodes.ToList().ForEach(c => db.Insert(c));
@ -660,10 +659,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 3) .With(c => c.SeasonNumber = 3)
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Build(); .Build();
episodes.ToList().ForEach(c => db.Insert(c)); episodes.ToList().ForEach(c => db.Insert(c));
@ -683,10 +682,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 3) .With(c => c.SeasonNumber = 3)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build(); .Build();
episodes.ToList().ForEach(c => db.Insert(c)); episodes.ToList().ForEach(c => db.Insert(c));
@ -734,10 +733,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 0) .With(c => c.SeasonNumber = 0)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build(); .Build();
episodes.ToList().ForEach(c => db.Insert(c)); episodes.ToList().ForEach(c => db.Insert(c));
@ -803,7 +802,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build(); var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).WhereTheFirst(1).Have(e => e.EpisodeFileId = 1).Have(e => e.EpisodeFile = fakeFile).Build(); .All().With(e => e.SeriesId = 1).TheFirst(1).With(e => e.EpisodeFileId = 1).With(e => e.EpisodeFile = fakeFile).Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -827,7 +826,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).WhereTheFirst(1).Have(e => e.EpisodeFileId = 0).Build(); .All().With(e => e.SeriesId = 1).TheFirst(1).With(e => e.EpisodeFileId = 0).Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -851,7 +850,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build(); var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).WhereTheFirst(1).Have(e => e.EpisodeFileId = 1).Have(e => e.EpisodeFile = fakeFile).Build(); .All().With(e => e.SeriesId = 1).TheFirst(1).With(e => e.EpisodeFileId = 1).With(e => e.EpisodeFile = fakeFile).Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -875,7 +874,7 @@ namespace NzbDrone.Core.Test
var fakeSeries = Builder<Series>.CreateNew().Build(); var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).WhereTheFirst(1).Have(e => e.EpisodeFileId = 0).Build(); .All().With(e => e.SeriesId = 1).TheFirst(1).With(e => e.EpisodeFileId = 0).Build();
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -897,7 +896,7 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5) var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.GrabDate = null) .All().With(e => e.GrabDate = null)
.Build(); .Build();
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -921,10 +920,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -957,10 +956,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -993,13 +992,12 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .And(c => c.SeasonNumber = 1)
.WhereTheFirst(2) .And(c => c.Ignored = true)
.Have(c => c.Ignored = false) .TheFirst(2)
.AndTheRemaining() .With(c => c.Ignored = false)
.Have(c => c.Ignored = true)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -1032,10 +1030,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -1060,10 +1058,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -1088,10 +1086,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -1116,10 +1114,10 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -1144,13 +1142,12 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.WhereTheFirst(2) .With(c => c.Ignored = true)
.Have(c => c.Ignored = false) .TheFirst(2)
.AndTheRemaining() .With(c => c.Ignored = false)
.Have(c => c.Ignored = true)
.Build().ToList(); .Build().ToList();
episodes.ForEach(c => db.Insert(c)); episodes.ForEach(c => db.Insert(c));
@ -1179,27 +1176,25 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4)) .With(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.WhereTheFirst(2) .TheFirst(2)
.Have(c => c.EpisodeFileId = 0) .With(c => c.EpisodeFileId = 0)
.WhereSection(1, 2) .WhereSection(1, 2)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
var specials = Builder<Episode>.CreateListOfSize(2) var specials = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 0) .With(c => c.SeasonNumber = 0)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4)) .With(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.EpisodeFileId = 0) .With(c => c.EpisodeFileId = 0)
.WhereTheFirst(1) .With(c => c.Ignored = false)
.Have(c => c.Ignored = true) .TheFirst(1).With(c => c.Ignored = true)
.AndTheRemaining()
.Have(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
db.Insert(series); db.Insert(series);
@ -1228,27 +1223,26 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(4) var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4)) .With(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.WhereTheFirst(2) .TheFirst(2)
.Have(c => c.EpisodeFileId = 0) .With(c => c.EpisodeFileId = 0)
.WhereSection(1, 2) .WhereSection(1, 2)
.Have(c => c.Ignored = false) .With(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
var specials = Builder<Episode>.CreateListOfSize(2) var specials = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 0) .With(c => c.SeasonNumber = 0)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4)) .With(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.EpisodeFileId = 0) .With(c => c.EpisodeFileId = 0)
.WhereTheFirst(1) .With(c => c.Ignored = false)
.Have(c => c.Ignored = true) .TheFirst(1)
.AndTheRemaining() .With(c => c.Ignored = true)
.Have(c => c.Ignored = false)
.Build().ToList(); .Build().ToList();
db.Insert(series); db.Insert(series);
@ -1281,13 +1275,13 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(2) var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4)) .With(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Have(c => c.EpisodeFile = episodeFile) .With(c => c.EpisodeFile = episodeFile)
.Have(c => c.EpisodeFileId = episodeFile.EpisodeFileId) .With(c => c.EpisodeFileId = episodeFile.EpisodeFileId)
.Build().ToList(); .Build().ToList();
db.Insert(series); db.Insert(series);
@ -1323,12 +1317,12 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(2) var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4)) .With(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true) .With(c => c.Ignored = true)
.Have(c => c.EpisodeFileId = 0) .With(c => c.EpisodeFileId = 0)
.Build().ToList(); .Build().ToList();
db.Insert(series); db.Insert(series);
@ -1355,10 +1349,10 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.EpisodeFileId = 12345) .With(c => c.EpisodeFileId = 12345)
.Build(); .Build();
db.Insert(series); db.Insert(series);
@ -1409,9 +1403,9 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10) var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Build(); .Build();
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -1431,9 +1425,9 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10) var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Build(); .Build();
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -1453,9 +1447,9 @@ namespace NzbDrone.Core.Test
mocker.SetConstant(db); mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10) var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.SeriesId = 10) .With(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Build(); .Build();
db.InsertMany(fakeEpisodes); db.InsertMany(fakeEpisodes);
@ -1485,10 +1479,10 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(episodeCount) var fakeEpisodes = Builder<Episode>.CreateListOfSize(episodeCount)
.WhereAll() .All()
.Have(c => c.SeriesId = 12345) .With(c => c.SeriesId = 12345)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown) .With(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -1519,10 +1513,10 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(1) var fakeEpisodes = Builder<Episode>.CreateListOfSize(1)
.WhereAll() .All()
.Have(c => c.SeriesId = 12345) .With(c => c.SeriesId = 12345)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown) .With(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -1531,7 +1525,7 @@ namespace NzbDrone.Core.Test
mocker.GetMock<SeriesProvider>().Setup(s => s.FindSeries("officeus")).Returns(fakeSeries); mocker.GetMock<SeriesProvider>().Setup(s => s.FindSeries("officeus")).Returns(fakeSeries);
//Act //Act
mocker.Resolve<EpisodeProvider>().SetPostDownloadStatus(new List<int>{300}, postDownloadStatus); mocker.Resolve<EpisodeProvider>().SetPostDownloadStatus(new List<int> { 300 }, postDownloadStatus);
//Assert //Assert
var result = db.Fetch<Episode>(); var result = db.Fetch<Episode>();

@ -31,8 +31,8 @@ namespace NzbDrone.Core.Test
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With( var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();
@ -71,8 +71,8 @@ namespace NzbDrone.Core.Test
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With( var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();
@ -111,8 +111,8 @@ namespace NzbDrone.Core.Test
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With( var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();
@ -151,8 +151,8 @@ namespace NzbDrone.Core.Test
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With( var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();
@ -194,8 +194,8 @@ namespace NzbDrone.Core.Test
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With( var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes = c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount). new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll() All()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) .With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build()) .Build())
).With(c => c.Id = seriesId).Build(); ).With(c => c.Id = seriesId).Build();

@ -234,5 +234,31 @@ namespace NzbDrone.Core.Test
db.Fetch<Episode>().Should().HaveCount(2); db.Fetch<Episode>().Should().HaveCount(2);
ep.First().Ignored.Should().BeFalse(); ep.First().Ignored.Should().BeFalse();
} }
[Test]
[Description("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
var episodes = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(new EpisodeParseResult());
//Assert
episodes.Should().NotBeNull();
episodes.Should().BeEmpty();
}
[Test]
[Description("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
var episodes = mocker.Resolve<EpisodeProvider>().GetEpisodesByParseResult(new EpisodeParseResult{EpisodeNumbers = new List<int>()});
//Assert
episodes.Should().NotBeNull();
episodes.Should().BeEmpty();
}
} }
} }

@ -45,7 +45,7 @@ namespace NzbDrone.Core.Test
var episodes = Builder<Episode>.CreateListOfSize(10).Build(); var episodes = Builder<Episode>.CreateListOfSize(10).Build();
var historyItems = Builder<History>.CreateListOfSize(10).WhereTheFirst(5).Have(h => h.SeriesId = seriesOne.SeriesId).WhereTheLast(5).Have(h => h.SeriesId = seriesTwo.SeriesId).Build(); var historyItems = Builder<History>.CreateListOfSize(10).TheFirst(5).With(h => h.SeriesId = seriesOne.SeriesId).WhereTheLast(5).With(h => h.SeriesId = seriesTwo.SeriesId).Build();
var mocker = new AutoMoqer(); var mocker = new AutoMoqer();
var db = MockLib.GetEmptyDatabase(); var db = MockLib.GetEmptyDatabase();
@ -95,8 +95,8 @@ namespace NzbDrone.Core.Test
{ {
//Setup //Setup
var historyItem = Builder<History>.CreateListOfSize(20) var historyItem = Builder<History>.CreateListOfSize(20)
.WhereTheFirst(10).Have(c => c.Date = DateTime.Now) .TheFirst(10).With(c => c.Date = DateTime.Now)
.AndTheNext(10).Have(c => c.Date = DateTime.Now.AddDays(-31)) .AndTheNext(10).With(c => c.Date = DateTime.Now.AddDays(-31))
.Build(); .Build();
var mocker = new AutoMoqer(); var mocker = new AutoMoqer();

@ -21,8 +21,8 @@ namespace NzbDrone.Core.Test
public void import_new_series_succesfull() public void import_new_series_succesfull()
{ {
var series = Builder<Series>.CreateListOfSize(2) var series = Builder<Series>.CreateListOfSize(2)
.WhereAll().Have(s => s.LastInfoSync = null) .All().With(s => s.LastInfoSync = null)
.WhereTheFirst(1).Has(s => s.SeriesId = 12) .TheFirst(1).Has(s => s.SeriesId = 12)
.AndTheNext(1).Has(s => s.SeriesId = 15) .AndTheNext(1).Has(s => s.SeriesId = 15)
.Build(); .Build();
@ -86,8 +86,8 @@ namespace NzbDrone.Core.Test
public void failed_import_should_not_be_stuck_in_loop() public void failed_import_should_not_be_stuck_in_loop()
{ {
var series = Builder<Series>.CreateListOfSize(2) var series = Builder<Series>.CreateListOfSize(2)
.WhereAll().Have(s => s.LastInfoSync = null) .All().With(s => s.LastInfoSync = null)
.WhereTheFirst(1).Has(s => s.SeriesId = 12) .TheFirst(1).Has(s => s.SeriesId = 12)
.AndTheNext(1).Has(s => s.SeriesId = 15) .AndTheNext(1).Has(s => s.SeriesId = 15)
.Build(); .Build();
@ -163,7 +163,7 @@ namespace NzbDrone.Core.Test
int seriesId = 12; int seriesId = 12;
var episodesFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodesFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll().Have(e => e.SeriesId = seriesId) .All().With(e => e.SeriesId = seriesId)
.Build(); .Build();
episodesFiles[0].SeasonNumber = 0; episodesFiles[0].SeasonNumber = 0;
@ -190,7 +190,7 @@ namespace NzbDrone.Core.Test
int seriesId = 12; int seriesId = 12;
var episodesFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodesFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll().Have(e => e.SeriesId = seriesId) .All().With(e => e.SeriesId = seriesId)
.Build(); .Build();
episodesFiles[0].SeasonNumber = 1; episodesFiles[0].SeasonNumber = 1;

@ -28,10 +28,10 @@ namespace NzbDrone.Core.Test
public void get_series_files() public void get_series_files()
{ {
var firstSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10) var firstSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
.WhereAll().Have(s => s.SeriesId = 12).Build(); .All().With(s => s.SeriesId = 12).Build();
var secondSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10) var secondSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
.WhereAll().Have(s => s.SeriesId = 20).Build(); .All().With(s => s.SeriesId = 20).Build();
var mocker = new AutoMoqer(); var mocker = new AutoMoqer();
@ -53,15 +53,15 @@ namespace NzbDrone.Core.Test
public void get_season_files() public void get_season_files()
{ {
var firstSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10) var firstSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
.WhereAll() .All()
.Have(s => s.SeriesId = 12) .With(s => s.SeriesId = 12)
.Have(s => s.SeasonNumber = 1) .With(s => s.SeasonNumber = 1)
.Build(); .Build();
var secondSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10) var secondSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
.WhereAll() .All()
.Have(s => s.SeriesId = 12) .With(s => s.SeriesId = 12)
.Have(s => s.SeasonNumber = 2) .With(s => s.SeasonNumber = 2)
.Build(); .Build();
var mocker = new AutoMoqer(); var mocker = new AutoMoqer();

@ -27,7 +27,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereTheFirst(1) .TheFirst(1)
.Has(f => f.EpisodeFileId = 1) .Has(f => f.EpisodeFileId = 1)
.Has(f => f.Path = @"C:\Test\Title1.avi") .Has(f => f.Path = @"C:\Test\Title1.avi")
.AndTheNext(1) .AndTheNext(1)
@ -36,9 +36,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(2) var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.WhereTheFirst(1) .TheFirst(1)
.Has(e => e.EpisodeFileId = 1) .Has(e => e.EpisodeFileId = 1)
.Has(e => e.EpisodeFile = episodeFiles[0]) .Has(e => e.EpisodeFile = episodeFiles[0])
.AndTheNext(1) .AndTheNext(1)
@ -76,7 +76,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereTheFirst(1) .TheFirst(1)
.Has(f => f.EpisodeFileId = 1) .Has(f => f.EpisodeFileId = 1)
.Has(f => f.Path = @"C:\Test\Title1.avi") .Has(f => f.Path = @"C:\Test\Title1.avi")
.AndTheNext(1) .AndTheNext(1)
@ -85,9 +85,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(2) var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.WhereTheFirst(1) .TheFirst(1)
.Has(e => e.EpisodeFileId = 1) .Has(e => e.EpisodeFileId = 1)
.Has(e => e.EpisodeFile = episodeFiles[0]) .Has(e => e.EpisodeFile = episodeFiles[0])
.AndTheNext(1) .AndTheNext(1)
@ -125,7 +125,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereTheFirst(1) .TheFirst(1)
.Has(f => f.EpisodeFileId = 1) .Has(f => f.EpisodeFileId = 1)
.Has(f => f.Path = @"C:\Test\Title1.avi") .Has(f => f.Path = @"C:\Test\Title1.avi")
.AndTheNext(1) .AndTheNext(1)
@ -134,9 +134,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(2) var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.WhereTheFirst(1) .TheFirst(1)
.Has(e => e.EpisodeFileId = 1) .Has(e => e.EpisodeFileId = 1)
.Has(e => e.EpisodeFile = episodeFiles[0]) .Has(e => e.EpisodeFile = episodeFiles[0])
.AndTheNext(1) .AndTheNext(1)
@ -176,7 +176,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereTheFirst(1) .TheFirst(1)
.Has(f => f.EpisodeFileId = 1) .Has(f => f.EpisodeFileId = 1)
.Has(f => f.Path = @"C:\Test\Title1.avi") .Has(f => f.Path = @"C:\Test\Title1.avi")
.AndTheNext(1) .AndTheNext(1)
@ -185,9 +185,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(3) var episodes = Builder<Episode>.CreateListOfSize(3)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.WhereTheFirst(2) .TheFirst(2)
.Has(e => e.EpisodeFileId = 1) .Has(e => e.EpisodeFileId = 1)
.Has(e => e.EpisodeFile = episodeFiles[0]) .Has(e => e.EpisodeFile = episodeFiles[0])
.AndTheNext(1) .AndTheNext(1)
@ -227,7 +227,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var episodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereTheFirst(1) .TheFirst(1)
.Has(f => f.EpisodeFileId = 1) .Has(f => f.EpisodeFileId = 1)
.Has(f => f.Path = @"C:\Test\Title1.avi") .Has(f => f.Path = @"C:\Test\Title1.avi")
.AndTheNext(1) .AndTheNext(1)
@ -236,9 +236,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(3) var episodes = Builder<Episode>.CreateListOfSize(3)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.WhereTheFirst(2) .TheFirst(2)
.Has(e => e.EpisodeFileId = 1) .Has(e => e.EpisodeFileId = 1)
.Has(e => e.EpisodeFile = episodeFiles[0]) .Has(e => e.EpisodeFile = episodeFiles[0])
.AndTheNext(1) .AndTheNext(1)

@ -36,11 +36,12 @@
<Reference Include="Accessibility"> <Reference Include="Accessibility">
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="FizzWare.NBuilder"> <Reference Include="FizzWare.NBuilder, Version=3.0.1.0, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
<HintPath>..\packages\NBuilder.2.3.0.0\lib\FizzWare.NBuilder.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NBuilder.3.0.1\lib\FizzWare.NBuilder.dll</HintPath>
</Reference> </Reference>
<Reference Include="FluentAssertions"> <Reference Include="FluentAssertions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\Libraries\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.1.5.0.0\Lib\.NetFramework 4.0\FluentAssertions.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll</HintPath>
@ -60,8 +61,7 @@
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath> <HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<HintPath>..\Libraries\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework"> <Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>

@ -41,10 +41,10 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(episodeCount) var fakeEpisodes = Builder<Episode>.CreateListOfSize(episodeCount)
.WhereAll() .All()
.Have(c => c.SeriesId = 12345) .With(c => c.SeriesId = 12345)
.Have(c => c.SeasonNumber = 1) .With(c => c.SeasonNumber = 1)
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown) .With(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.Build(); .Build();
var expectedEpisodesNumbers = fakeEpisodes.Select(e => e.EpisodeId).ToList(); var expectedEpisodesNumbers = fakeEpisodes.Select(e => e.EpisodeId).ToList();
@ -200,8 +200,8 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll() .All()
.Have(f => f.SeriesId = fakeSeries.SeriesId) .With(f => f.SeriesId = fakeSeries.SeriesId)
.Build().ToList(); .Build().ToList();
//Act //Act
@ -230,8 +230,8 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2) var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll() .All()
.Have(f => f.SeriesId = fakeSeries.SeriesId) .With(f => f.SeriesId = fakeSeries.SeriesId)
.Build().ToList(); .Build().ToList();
//Act //Act

@ -55,7 +55,7 @@ namespace NzbDrone.Core.Test
public void processResults_higher_quality_should_be_called_first() public void processResults_higher_quality_should_be_called_first()
{ {
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(10) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(10)
.WhereAll().Have(c => c.Quality = new Quality(QualityTypes.DVD, true)) .All().With(c => c.Quality = new Quality(QualityTypes.DVD, true))
.WhereRandom(1).Has(c => c.Quality = new Quality(QualityTypes.Bluray1080p, true)) .WhereRandom(1).Has(c => c.Quality = new Quality(QualityTypes.Bluray1080p, true))
.Build(); .Build();
@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test
public void processResults_when_same_quality_proper_should_be_called_first() public void processResults_when_same_quality_proper_should_be_called_first()
{ {
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(20) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(20)
.WhereAll().Have(c => c.Quality = new Quality(QualityTypes.DVD, false)) .All().With(c => c.Quality = new Quality(QualityTypes.DVD, false))
.WhereRandom(1).Has(c => c.Quality = new Quality(QualityTypes.DVD, true)) .WhereRandom(1).Has(c => c.Quality = new Quality(QualityTypes.DVD, true))
.Build(); .Build();

@ -30,16 +30,16 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereAll() .All()
.Have(e => e.EpisodeNumbers = Builder<int>.CreateListOfSize(2).Build().ToList()) .With(e => e.EpisodeNumbers = Builder<int>.CreateListOfSize(2).Build().ToList())
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -93,16 +93,16 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereAll() .All()
.Have(e => e.EpisodeNumbers = Builder<int>.CreateListOfSize(2).Build().ToList()) .With(e => e.EpisodeNumbers = Builder<int>.CreateListOfSize(2).Build().ToList())
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -150,9 +150,9 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereAll() .All()
.Have(e => e.EpisodeNumbers = Builder<int>.CreateListOfSize(2).Build().ToList()) .With(e => e.EpisodeNumbers = Builder<int>.CreateListOfSize(2).Build().ToList())
.Have(e => e.Series = series) .With(e => e.Series = series)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -184,7 +184,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereTheFirst(1) .TheFirst(1)
.Has(p => p.CleanTitle = "title") .Has(p => p.CleanTitle = "title")
.Has(p => p.SeasonNumber = 1) .Has(p => p.SeasonNumber = 1)
.Has(p => p.FullSeason = true) .Has(p => p.FullSeason = true)

@ -30,15 +30,15 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereTheFirst(1) .TheFirst(1)
.Has(p => p.CleanTitle = "title") .Has(p => p.CleanTitle = "title")
.Has(p => p.SeasonNumber = 1) .Has(p => p.SeasonNumber = 1)
.Has(p => p.FullSeason = true) .Has(p => p.FullSeason = true)
@ -95,11 +95,11 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.Series = series) .With(e => e.Series = series)
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
@ -150,7 +150,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereTheFirst(1) .TheFirst(1)
.Has(p => p.CleanTitle = "title") .Has(p => p.CleanTitle = "title")
.Has(p => p.SeasonNumber = 1) .Has(p => p.SeasonNumber = 1)
.Has(p => p.FullSeason = true) .Has(p => p.FullSeason = true)
@ -184,7 +184,7 @@ namespace NzbDrone.Core.Test
.Build(); .Build();
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4) var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(4)
.WhereTheFirst(1) .TheFirst(1)
.Has(p => p.CleanTitle = "title") .Has(p => p.CleanTitle = "title")
.Has(p => p.SeasonNumber = 1) .Has(p => p.SeasonNumber = 1)
.Has(p => p.FullSeason = true) .Has(p => p.FullSeason = true)

@ -45,9 +45,9 @@ namespace NzbDrone.Core.Test
public void SeasonSearch_partial_season_success() public void SeasonSearch_partial_season_success()
{ {
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);
@ -78,10 +78,10 @@ namespace NzbDrone.Core.Test
public void SeasonSearch_partial_season_failure() public void SeasonSearch_partial_season_failure()
{ {
var episodes = Builder<Episode>.CreateListOfSize(5) var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll() .All()
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1) .With(e => e.SeasonNumber = 1)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Build(); .Build();
var mocker = new AutoMoqer(MockBehavior.Strict); var mocker = new AutoMoqer(MockBehavior.Strict);

@ -216,13 +216,13 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10) var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll().Have(e => e.SeriesId = fakeSeries.SeriesId) .All().With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Have(e => e.AirDate = DateTime.Today) .With(e => e.AirDate = DateTime.Today)
.WhereTheFirst(5) .TheFirst(5)
.Have(e => e.EpisodeFileId = 0) .With(e => e.EpisodeFileId = 0)
.WhereTheLast(2) .WhereTheLast(2)
.Have(e => e.AirDate = DateTime.Today.AddDays(1)) .With(e => e.AirDate = DateTime.Today.AddDays(1))
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -248,7 +248,7 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10).WhereAll().Have(e => e.SeriesId = fakeSeries.SeriesId).Have(e => e.Ignored = true).WhereRandom(5).Have(e => e.EpisodeFileId = 0).Build(); var fakeEpisodes = Builder<Episode>.CreateListOfSize(10).All().With(e => e.SeriesId = fakeSeries.SeriesId).With(e => e.Ignored = true).WhereRandom(5).With(e => e.EpisodeFileId = 0).Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
db.Insert(fakeQuality); db.Insert(fakeQuality);
@ -274,10 +274,10 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10) var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Have(e => e.AirDate = DateTime.Today.AddDays(-1)) .With(e => e.AirDate = DateTime.Today.AddDays(-1))
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -304,13 +304,13 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10) var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.AirDate = DateTime.Today.AddDays(-1)) .With(e => e.AirDate = DateTime.Today.AddDays(-1))
.WhereTheFirst(5) .TheFirst(5)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.WhereTheLast(5) .WhereTheLast(5)
.Have(e => e.Ignored = true) .With(e => e.Ignored = true)
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -362,10 +362,10 @@ namespace NzbDrone.Core.Test
var path = @"C:\Test\TV\30 Rock"; var path = @"C:\Test\TV\30 Rock";
var fakeSeries = Builder<Series>.CreateListOfSize(10) var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.QualityProfileId = 1) .With(c => c.QualityProfileId = 1)
.WhereTheFirst(1) .TheFirst(1)
.Have(c => c.Path = path) .With(c => c.Path = path)
.Build(); .Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -393,10 +393,10 @@ namespace NzbDrone.Core.Test
var path = @"C:\Test\TV\30 Rock"; var path = @"C:\Test\TV\30 Rock";
var fakeSeries = Builder<Series>.CreateListOfSize(10) var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.QualityProfileId = 1) .With(c => c.QualityProfileId = 1)
.WhereTheFirst(1) .TheFirst(1)
.Have(c => c.Path = path) .With(c => c.Path = path)
.Build(); .Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -424,10 +424,10 @@ namespace NzbDrone.Core.Test
var path = @"C:\Test\TV\The Simpsons"; var path = @"C:\Test\TV\The Simpsons";
var fakeSeries = Builder<Series>.CreateListOfSize(10) var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.QualityProfileId = 1) .With(c => c.QualityProfileId = 1)
.WhereTheFirst(1) .TheFirst(1)
.Have(c => c.Path = path) .With(c => c.Path = path)
.Build(); .Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -455,10 +455,10 @@ namespace NzbDrone.Core.Test
var path = @"C:\Test\TV\30 Rock"; var path = @"C:\Test\TV\30 Rock";
var fakeSeries = Builder<Series>.CreateListOfSize(10) var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll() .All()
.Have(c => c.QualityProfileId = 1) .With(c => c.QualityProfileId = 1)
.WhereTheFirst(1) .TheFirst(1)
.Have(c => c.Path = path) .With(c => c.Path = path)
.Build(); .Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -486,13 +486,12 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.WhereTheFirst(1) .With(e => e.AirDate = DateTime.Today.AddDays(1))
.Have(e => e.AirDate = DateTime.Today) .TheFirst(1)
.AndTheRemaining() .With(e => e.AirDate = DateTime.Today)
.Have(e => e.AirDate = DateTime.Today.AddDays(1))
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -518,13 +517,12 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.WhereTheFirst(1) .With(e => e.AirDate = DateTime.Today.AddDays(1))
.Have(e => e.AirDate = DateTime.Today.AddDays(-1)) .TheFirst(1)
.AndTheRemaining() .With(e => e.AirDate = DateTime.Today.AddDays(-1))
.Have(e => e.AirDate = DateTime.Today.AddDays(1))
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -550,10 +548,10 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.AirDate = null) .With(e => e.AirDate = null)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -579,13 +577,12 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.WhereTheFirst(1) .With(e => e.AirDate = DateTime.Today.AddMonths(1))
.Have(e => e.AirDate = DateTime.Today.AddDays(-1)) .TheFirst(1)
.AndTheRemaining() .With(e => e.AirDate = DateTime.Today.AddDays(-1))
.Have(e => e.AirDate = DateTime.Today.AddMonths(1))
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);
@ -611,14 +608,13 @@ namespace NzbDrone.Core.Test
var fakeQuality = Builder<QualityProfile>.CreateNew().Build(); var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2) var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll() .All()
.Have(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.SeriesId = fakeSeries.SeriesId)
.WhereTheFirst(1) .With(e => e.AirDate = DateTime.Today.AddMonths(1))
.Have(e => e.AirDate = DateTime.Today.AddDays(1)) .With(e => e.Ignored = false)
.Have(e => e.Ignored = true) .TheFirst(1)
.AndTheRemaining() .With(e => e.AirDate = DateTime.Today.AddDays(1))
.Have(e => e.AirDate = DateTime.Today.AddMonths(1)) .With(e => e.Ignored = true)
.Have(e => e.Ignored = false)
.Build(); .Build();
db.Insert(fakeSeries); db.Insert(fakeSeries);

@ -23,10 +23,10 @@ namespace NzbDrone.Core.Test
public new void Setup() public new void Setup()
{ {
episodes = Builder<Episode>.CreateListOfSize(6) episodes = Builder<Episode>.CreateListOfSize(6)
.WhereAll() .All()
.Have(e => e.SeriesId = 1) .With(e => e.SeriesId = 1)
.Have(e => e.Ignored = false) .With(e => e.Ignored = false)
.WhereTheFirst(1) .TheFirst(1)
.Has(e => e.AirDate = DateTime.Today.AddDays(-1)) .Has(e => e.AirDate = DateTime.Today.AddDays(-1))
.AndTheNext(1) .AndTheNext(1)
.Has(e => e.AirDate = DateTime.Today) .Has(e => e.AirDate = DateTime.Today)

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NBuilder" version="2.3.0.0" />
<package id="AutoMoq" version="1.3.1.3" /> <package id="AutoMoq" version="1.3.1.3" />
<package id="Moq" version="4.0.10827" />
<package id="CommonServiceLocator" version="1.0" /> <package id="CommonServiceLocator" version="1.0" />
<package id="Unity" version="2.1.505.0" /> <package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1" />
<package id="Ninject" version="2.2.1.4" />
<package id="NUnit" version="2.5.10.11092" /> <package id="NUnit" version="2.5.10.11092" />
<package id="SqlServerCompact" version="4.0.8482.1" /> <package id="SqlServerCompact" version="4.0.8482.1" />
<package id="Ninject" version="2.2.1.4" /> <package id="Unity" version="2.1.505.0" />
<package id="FluentAssertions" version="1.5.0.0" />
<package id="NLog" version="2.0.0.2000" />
</packages> </packages>

@ -146,8 +146,7 @@
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath> <HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<HintPath>..\Libraries\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" /> <Reference Include="System.ComponentModel.Composition" />

@ -125,6 +125,9 @@ namespace NzbDrone.Core.Providers
{ {
var result = new List<Episode>(); var result = new List<Episode>();
if (parseResult.EpisodeNumbers == null)
return result;
foreach (var episodeNumber in parseResult.EpisodeNumbers) foreach (var episodeNumber in parseResult.EpisodeNumbers)
{ {
var episodeInfo = GetEpisode(parseResult.Series.SeriesId, parseResult.SeasonNumber, episodeNumber); var episodeInfo = GetEpisode(parseResult.Series.SeriesId, parseResult.SeasonNumber, episodeNumber);
@ -159,7 +162,7 @@ namespace NzbDrone.Core.Providers
} }
else else
{ {
Logger.Debug("Unable to file {0}-S{1:00}E{2:00}", parseResult.Series.Title, parseResult.SeasonNumber, episodeNumber); Logger.Debug("Unable to find {0}-S{1:00}E{2:00}", parseResult.Series.Title, parseResult.SeasonNumber, episodeNumber);
} }
} }

@ -3,4 +3,5 @@
<package id="MiniProfiler" version="1.9" /> <package id="MiniProfiler" version="1.9" />
<package id="Ninject" version="2.2.1.4" /> <package id="Ninject" version="2.2.1.4" />
<package id="SqlServerCompact" version="4.0.8482.1" /> <package id="SqlServerCompact" version="4.0.8482.1" />
<package id="NLog" version="2.0.0.2000" />
</packages> </packages>

@ -62,8 +62,7 @@
<HintPath>..\packages\Ninject.MVC3.2.2.2.0\lib\net40-Full\Ninject.Web.Mvc.dll</HintPath> <HintPath>..\packages\Ninject.MVC3.2.2.2.0\lib\net40-Full\Ninject.Web.Mvc.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<HintPath>..\Libraries\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />

@ -12,4 +12,5 @@
<package id="jQuery" version="1.6.3" /> <package id="jQuery" version="1.6.3" />
<package id="jQuery.UI.Combined" version="1.8.16" /> <package id="jQuery.UI.Combined" version="1.8.16" />
<package id="TelerikMvcExtensions" version="2011.2.712" /> <package id="TelerikMvcExtensions" version="2011.2.712" />
<package id="NLog" version="2.0.0.2000" />
</packages> </packages>

@ -74,8 +74,7 @@
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath> <HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<HintPath>..\Libraries\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Ninject" version="2.2.1.4" /> <package id="Ninject" version="2.2.1.4" />
<package id="NLog" version="2.0.0.2000" />
</packages> </packages>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -1348,6 +1348,13 @@
<param name="section">Section XML node.</param> <param name="section">Section XML node.</param>
<returns>The created section handler object.</returns> <returns>The created section handler object.</returns>
</member> </member>
<member name="T:NLog.Config.ConfigurationItemCreator">
<summary>
Constructs a new instance the configuration item (target, layout, layout renderer, etc.) given its type.
</summary>
<param name="itemType">Type of the item.</param>
<returns>Created object of the specified type.</returns>
</member>
<member name="T:NLog.Config.ConfigurationItemFactory"> <member name="T:NLog.Config.ConfigurationItemFactory">
<summary> <summary>
Provides registration information for named items (targets, layouts, layout renderers, etc.) managed by NLog. Provides registration information for named items (targets, layouts, layout renderers, etc.) managed by NLog.
@ -1405,6 +1412,14 @@
Gets or sets default singleton instance of <see cref="T:NLog.Config.ConfigurationItemFactory"/>. Gets or sets default singleton instance of <see cref="T:NLog.Config.ConfigurationItemFactory"/>.
</summary> </summary>
</member> </member>
<member name="P:NLog.Config.ConfigurationItemFactory.CreateInstance">
<summary>
Gets or sets the creator delegate used to instantiate configuration objects.
</summary>
<remarks>
By overriding this property, one can enable dependency injection or interception for created objects.
</remarks>
</member>
<member name="P:NLog.Config.ConfigurationItemFactory.Targets"> <member name="P:NLog.Config.ConfigurationItemFactory.Targets">
<summary> <summary>
Gets the <see cref="T:NLog.Targets.Target"/> factory. Gets the <see cref="T:NLog.Targets.Target"/> factory.
@ -2500,7 +2515,7 @@
Gets the Global Diagnostics Context named item. Gets the Global Diagnostics Context named item.
</summary> </summary>
<param name="item">Item name.</param> <param name="item">Item name.</param>
<returns>The item value of String.Empty if the value is not present.</returns> <returns>The item value of string.Empty if the value is not present.</returns>
</member> </member>
<member name="M:NLog.GDC.Contains(System.String)"> <member name="M:NLog.GDC.Contains(System.String)">
<summary> <summary>
@ -2537,7 +2552,7 @@
Gets the Global Diagnostics Context named item. Gets the Global Diagnostics Context named item.
</summary> </summary>
<param name="item">Item name.</param> <param name="item">Item name.</param>
<returns>The item value of String.Empty if the value is not present.</returns> <returns>The item value of string.Empty if the value is not present.</returns>
</member> </member>
<member name="M:NLog.GlobalDiagnosticsContext.Contains(System.String)"> <member name="M:NLog.GlobalDiagnosticsContext.Contains(System.String)">
<summary> <summary>
@ -2701,7 +2716,7 @@
Gets or sets the <see cref="T:System.Object"/> with the specified key. Gets or sets the <see cref="T:System.Object"/> with the specified key.
</summary> </summary>
<param name="key">Dictionary key.</param> <param name="key">Dictionary key.</param>
<value>Value corresponding to key or null if not found</value> <returns>Value corresponding to key or null if not found</returns>
</member> </member>
<member name="T:NLog.Internal.DictionaryAdapter`2.MyEnumerator"> <member name="T:NLog.Internal.DictionaryAdapter`2.MyEnumerator">
<summary> <summary>
@ -3668,6 +3683,26 @@
Detects the platform the NLog is running on. Detects the platform the NLog is running on.
</summary> </summary>
</member> </member>
<member name="P:NLog.Internal.PlatformDetector.CurrentOS">
<summary>
Gets the current runtime OS.
</summary>
</member>
<member name="P:NLog.Internal.PlatformDetector.IsDesktopWin32">
<summary>
Gets a value indicating whether current OS is a desktop version of Windows.
</summary>
</member>
<member name="P:NLog.Internal.PlatformDetector.IsWin32">
<summary>
Gets a value indicating whether current OS is Win32-based (desktop or mobile).
</summary>
</member>
<member name="P:NLog.Internal.PlatformDetector.IsUnix">
<summary>
Gets a value indicating whether current OS is Unix-based.
</summary>
</member>
<member name="T:NLog.Internal.PortableFileInfoHelper"> <member name="T:NLog.Internal.PortableFileInfoHelper">
<summary> <summary>
Portable implementation of <see cref="T:NLog.Internal.FileInfoHelper"/>. Portable implementation of <see cref="T:NLog.Internal.FileInfoHelper"/>.
@ -3914,6 +3949,27 @@
</summary> </summary>
<value>The next item in the chain.</value> <value>The next item in the chain.</value>
</member> </member>
<member name="T:NLog.Internal.ThreadLocalStorageHelper">
<summary>
Helper for dealing with thread-local storage.
</summary>
</member>
<member name="M:NLog.Internal.ThreadLocalStorageHelper.AllocateDataSlot">
<summary>
Allocates the data slot for storing thread-local information.
</summary>
<returns>Allocated slot key.</returns>
</member>
<member name="M:NLog.Internal.ThreadLocalStorageHelper.GetDataForSlot``1(System.Object)">
<summary>
Gets the data for a slot in thread-local storage.
</summary>
<typeparam name="T">Type of the data.</typeparam>
<param name="slot">The slot to get data for.</param>
<returns>
Slot data (will create T if null).
</returns>
</member>
<member name="T:NLog.Internal.TimeoutContinuation"> <member name="T:NLog.Internal.TimeoutContinuation">
<summary> <summary>
Wraps <see cref="T:NLog.Common.AsyncContinuation"/> with a timeout. Wraps <see cref="T:NLog.Common.AsyncContinuation"/> with a timeout.
@ -5630,6 +5686,29 @@
</summary> </summary>
<docgen category='Advanced Options' order='10' /> <docgen category='Advanced Options' order='10' />
</member> </member>
<member name="T:NLog.LayoutRenderers.Wrappers.JsonEncodeLayoutRendererWrapper">
<summary>
Escapes output of another layout using JSON rules.
</summary>
</member>
<member name="M:NLog.LayoutRenderers.Wrappers.JsonEncodeLayoutRendererWrapper.#ctor">
<summary>
Initializes a new instance of the <see cref="T:NLog.LayoutRenderers.Wrappers.JsonEncodeLayoutRendererWrapper"/> class.
</summary>
</member>
<member name="M:NLog.LayoutRenderers.Wrappers.JsonEncodeLayoutRendererWrapper.Transform(System.String)">
<summary>
Post-processes the rendered message.
</summary>
<param name="text">The text to be post-processed.</param>
<returns>JSON-encoded string.</returns>
</member>
<member name="P:NLog.LayoutRenderers.Wrappers.JsonEncodeLayoutRendererWrapper.JsonEncode">
<summary>
Gets or sets a value indicating whether to apply JSON encoding.
</summary>
<docgen category="Transformation Options" order="10"/>
</member>
<member name="T:NLog.LayoutRenderers.Wrappers.LowercaseLayoutRendererWrapper"> <member name="T:NLog.LayoutRenderers.Wrappers.LowercaseLayoutRendererWrapper">
<summary> <summary>
Converts the result of another layout output to lower case. Converts the result of another layout output to lower case.
@ -6122,6 +6201,16 @@
<param name="logEvent">The logging event.</param> <param name="logEvent">The logging event.</param>
<returns>The rendered layout.</returns> <returns>The rendered layout.</returns>
</member> </member>
<member name="P:NLog.Layouts.Layout.IsThreadAgnostic">
<summary>
Gets a value indicating whether this layout is thread-agnostic (can be rendered on any thread).
</summary>
<remarks>
Layout is thread-agnostic if it has been marked with [ThreadAgnostic] attribute and all its children are
like that as well.
Thread-agnostic layouts only use contents of <see cref="T:NLog.LogEventInfo"/> for its output.
</remarks>
</member>
<member name="P:NLog.Layouts.Layout.LoggingConfiguration"> <member name="P:NLog.Layouts.Layout.LoggingConfiguration">
<summary> <summary>
Gets the logging configuration this target is part of. Gets the logging configuration this target is part of.
@ -9931,7 +10020,7 @@
Gets the current thread MDC named item. Gets the current thread MDC named item.
</summary> </summary>
<param name="item">Item name.</param> <param name="item">Item name.</param>
<returns>The item value of String.Empty if the value is not present.</returns> <returns>The item value of string.Empty if the value is not present.</returns>
</member> </member>
<member name="M:NLog.MappedDiagnosticsContext.Contains(System.String)"> <member name="M:NLog.MappedDiagnosticsContext.Contains(System.String)">
<summary> <summary>
@ -9968,7 +10057,7 @@
Gets the current thread MDC named item. Gets the current thread MDC named item.
</summary> </summary>
<param name="item">Item name.</param> <param name="item">Item name.</param>
<returns>The item value of String.Empty if the value is not present.</returns> <returns>The item value of string.Empty if the value is not present.</returns>
</member> </member>
<member name="M:NLog.MDC.Contains(System.String)"> <member name="M:NLog.MDC.Contains(System.String)">
<summary> <summary>
@ -10565,7 +10654,7 @@
<img src="examples/targets/Screenshots/Network/Output.gif" /> <img src="examples/targets/Screenshots/Network/Output.gif" />
<p> <p>
NOTE: If your receiver application is ever likely to be off-line, don't use TCP protocol NOTE: If your receiver application is ever likely to be off-line, don't use TCP protocol
or you'll get TCP timeouts and your application will crawl. or you'll get TCP timeouts and your application will be very slow.
Either switch to UDP transport or use <a href="target.AsyncWrapper.html">AsyncWrapper</a> target Either switch to UDP transport or use <a href="target.AsyncWrapper.html">AsyncWrapper</a> target
so that your application threads will not be blocked by the timing-out connection attempts. so that your application threads will not be blocked by the timing-out connection attempts.
</p> </p>
@ -10616,14 +10705,16 @@
<remarks> <remarks>
The network address can be: The network address can be:
<ul> <ul>
<li>tcp://host:port - TCP (auto select IPv4/IPv6)</li> <li>tcp://host:port - TCP (auto select IPv4/IPv6) (not supported on Windows Phone 7.0)</li>
<li>tcp4://host:port - force TCP/IPv4</li> <li>tcp4://host:port - force TCP/IPv4 (not supported on Windows Phone 7.0)</li>
<li>tcp6://host:port - force TCP/IPv6</li> <li>tcp6://host:port - force TCP/IPv6 (not supported on Windows Phone 7.0)</li>
<li>udp://host:port - UDP (auto select IPv4/IPv6, not supported on Silverlight)</li> <li>udp://host:port - UDP (auto select IPv4/IPv6, not supported on Silverlight and on Windows Phone 7.0)</li>
<li>udp4://host:port - force UDP/IPv4 (not supported on Silverlight)</li> <li>udp4://host:port - force UDP/IPv4 (not supported on Silverlight and on Windows Phone 7.0)</li>
<li>udp6://host:port - force UDP/IPv6 (not supported on Silverlight)</li> <li>udp6://host:port - force UDP/IPv6 (not supported on Silverlight and on Windows Phone 7.0)</li>
<li>http://host:port/pageName - HTTP using POST verb</li>
<li>https://host:port/pageName - HTTPS using POST verb</li>
</ul> </ul>
For HTTP Support use WebService target. For SOAP-based webservice support over HTTP use WebService target.
</remarks> </remarks>
<docgen category='Connection Options' order='10' /> <docgen category='Connection Options' order='10' />
</member> </member>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save