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

This commit is contained in:
Mark McDowall 2011-10-20 16:39:13 -07:00
commit f6e14b51f6
54 changed files with 75096 additions and 5196 deletions

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

View file

@ -35,7 +35,7 @@
<Reference Include="FizzWare.NBuilder">
<HintPath>..\packages\NBuilder.3.0.1\lib\FizzWare.NBuilder.dll</HintPath>
</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>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation">

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.0" />
<package id="FluentAssertions" version="1.5.0.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="Unity" version="2.1.505.0" />
<package id="FluentAssertions" version="1.5.0.0" />
</packages>

View file

@ -102,9 +102,9 @@ public void series_season_missing_episodes_only_mismatch_count()
var notification = new ProgressNotification("Backlog Search Job Test");
var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll()
.Have(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1)
.All()
.With(e => e.SeriesId = 1)
.With(e => e.SeasonNumber = 1)
.Build();
var mocker = new AutoMoqer(MockBehavior.Strict);
@ -116,7 +116,7 @@ public void series_season_missing_episodes_only_mismatch_count()
.Setup(s => s.Start(notification, It.IsAny<int>(), 0)).Verifiable();
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
mocker.Resolve<BacklogSearchJob>().Start(notification, 0, 0);
@ -136,9 +136,9 @@ public void series_season_missing_episodes_only()
var notification = new ProgressNotification("Backlog Search Job Test");
var episodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll()
.Have(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1)
.All()
.With(e => e.SeriesId = 1)
.With(e => e.SeasonNumber = 1)
.Build();
var mocker = new AutoMoqer(MockBehavior.Strict);
@ -170,9 +170,9 @@ public void multiple_missing_episodes()
var notification = new ProgressNotification("Backlog Search Job Test");
var episodes = Builder<Episode>.CreateListOfSize(10)
.WhereTheFirst(5)
.Have(e => e.SeriesId = 1)
.Have(e => e.SeasonNumber = 1)
.TheFirst(5)
.With(e => e.SeriesId = 1)
.With(e => e.SeasonNumber = 1)
.Build();
var mocker = new AutoMoqer(MockBehavior.Strict);
@ -187,7 +187,7 @@ public void multiple_missing_episodes()
.Setup(s => s.Start(notification, It.IsAny<int>(), 0)).Verifiable();
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
mocker.Resolve<BacklogSearchJob>().Start(notification, 0, 0);

View file

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

View file

@ -48,7 +48,7 @@ public void series_specific_scan_should_scan_series()
public void job_with_no_target_should_scan_all_series()
{
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)
.Build();
@ -76,7 +76,7 @@ public void job_with_no_target_should_scan_all_series()
public void failed_scan_should_not_terminated_job()
{
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)
.Build();
@ -105,7 +105,7 @@ public void failed_scan_should_not_terminated_job()
public void job_with_no_target_should_scan_series_with_episodes()
{
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)
.Build();

View file

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

View file

@ -25,9 +25,9 @@ public void Download_report_should_send_to_sab_add_to_history_mark_as_grabbed()
.Build();
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)
.WhereAll().Has(s => s.SeriesId = 5)
.All().Has(s => s.SeriesId = 5)
.Build();

View file

@ -32,7 +32,7 @@ public void GetEpisodes_exists()
var fakeSeries = Builder<Series>.CreateNew().Build();
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.InsertMany(fakeEpisodes);
@ -98,7 +98,7 @@ public void GetEpisode_with_EpisodeFile()
var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build();
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.InsertMany(fakeEpisodes);
@ -124,7 +124,7 @@ public void GetEpisodes_invalid_series()
mocker.Resolve<SeriesProvider>();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 1).Build();
.All().With(e => e.SeriesId = 1).Build();
db.InsertMany(fakeEpisodes);
@ -154,7 +154,7 @@ public void AttachSeries_list_success()
var fakeSeries = Builder<Series>.CreateNew().With(s => s.SeriesId = 12).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.SeriesId = 12).Build();
.All().With(e => e.SeriesId = 12).Build();
mocker.GetMock<SeriesProvider>()
.Setup(c => c.GetSeries(12))
@ -225,9 +225,9 @@ public void GetEpisodesBySeason_success()
.Build();
var episodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll().Have(c => c.SeriesId = 12)
.WhereTheFirst(5).Have(c => c.SeasonNumber = 1)
.AndTheRemaining().Have(c => c.SeasonNumber = 2).Build();
.All().With(c => c.SeriesId = 12).And(c => c.SeasonNumber = 2)
.TheFirst(5).With(c => c.SeasonNumber = 1)
.Build();
var db = MockLib.GetEmptyDatabase();
var mocker = new AutoMoqer();
@ -254,8 +254,8 @@ public void RefreshEpisodeInfo_emptyRepo()
var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build())
).With(c => c.Id = seriesId).Build();
@ -293,10 +293,9 @@ public void RefreshEpisodeInfo_should_set_older_than_1900_to_null()
var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(10).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.WhereTheFirst(7).Have(e => e.FirstAired = new DateTime(1800, 1, 1))
.AndTheRemaining().Have(e => e.FirstAired = DateTime.Now)
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a")).And(e => e.FirstAired = DateTime.Now)
.TheFirst(7).With(e => e.FirstAired = new DateTime(1800, 1, 1))
.Build())
).With(c => c.Id = seriesId).Build();
@ -336,9 +335,9 @@ public void RefreshEpisodeInfo_ignore_episode_zero()
var fakeEpisodes = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.WhereTheFirst(1)
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.TheFirst(1)
.Has(e => e.EpisodeNumber = 0)
.Has(e => e.SeasonNumber = 15)
.Build())
@ -447,7 +446,7 @@ public void should_try_to_get_existing_episode_using_tvdbid_first()
.With(c => c.Id = seriesId)
.With(c => c.Episodes = new List<TvdbEpisode>(
Builder<TvdbEpisode>.CreateListOfSize(1)
.WhereAll().Have(g => g.Id = 99)
.All().With(g => g.Id = 99)
.Build())
)
.Build();
@ -565,10 +564,10 @@ public void IsSeasonIgnored_should_return_true_if_all_episodes_ignored()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.Ignored = true)
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 2)
.All()
.With(c => c.Ignored = true)
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 2)
.Build();
episodes.ToList().ForEach(c => db.Insert(c));
@ -588,10 +587,10 @@ public void IsSeasonIgnored_should_return_false_if_none_of_episodes_are_ignored(
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.Ignored = false)
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 2)
.All()
.With(c => c.Ignored = false)
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 2)
.Build();
episodes.ToList().ForEach(c => db.Insert(c));
@ -611,10 +610,10 @@ public void IsSeasonIgnored_should_return_false_if_some_of_episodes_are_ignored(
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 2)
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 2)
.With(c => c.Ignored = true)
.Build();
episodes[2].Ignored = false;
@ -637,10 +636,10 @@ public void IsSeasonIgnored_should_return_false_if_zero_episodes_in_db_for_seaso
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 3)
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 3)
.With(c => c.Ignored = true)
.Build();
episodes.ToList().ForEach(c => db.Insert(c));
@ -660,10 +659,10 @@ public void IsSeasonIgnored_should_return_true_if_zero_episodes_in_db_for_season
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 3)
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 3)
.With(c => c.Ignored = true)
.Build();
episodes.ToList().ForEach(c => db.Insert(c));
@ -683,10 +682,10 @@ public void IsSeasonIgnored_should_return_false_if_zero_episodes_in_db_for_seaso
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 3)
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 3)
.With(c => c.Ignored = false)
.Build();
episodes.ToList().ForEach(c => db.Insert(c));
@ -734,10 +733,10 @@ public void IsSeasonIgnored_should_return_false_if_season_zero_is_not_ignored()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 0)
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 0)
.With(c => c.Ignored = false)
.Build();
episodes.ToList().ForEach(c => db.Insert(c));
@ -803,7 +802,7 @@ public void GetEpisode_by_Season_Episode_with_EpisodeFile()
var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build();
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.InsertMany(fakeEpisodes);
@ -827,7 +826,7 @@ public void GetEpisode_by_Season_Episode_without_EpisodeFile()
var fakeSeries = Builder<Series>.CreateNew().Build();
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.InsertMany(fakeEpisodes);
@ -851,7 +850,7 @@ public void GetEpisode_by_AirDate_with_EpisodeFile()
var fakeSeries = Builder<Series>.CreateNew().Build();
var fakeFile = Builder<EpisodeFile>.CreateNew().With(f => f.EpisodeFileId).Build();
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.InsertMany(fakeEpisodes);
@ -875,7 +874,7 @@ public void GetEpisode_by_AirDate_without_EpisodeFile()
var fakeSeries = Builder<Series>.CreateNew().Build();
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.Insert(fakeSeries);
@ -897,7 +896,7 @@ public void MarkEpisodeAsFetched()
mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(5)
.WhereAll().Have(e => e.GrabDate = null)
.All().With(e => e.GrabDate = null)
.Build();
db.InsertMany(fakeEpisodes);
@ -921,10 +920,10 @@ public void AddEpisode_episode_is_ignored_when_full_season_is_ignored()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = true)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -957,10 +956,10 @@ public void AddEpisode_episode_is_not_ignored_when_full_season_is_not_ignored()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = false)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -993,14 +992,13 @@ public void AddEpisode_episode_is_not_ignored_when_not_full_season_is_not_ignore
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.WhereTheFirst(2)
.Have(c => c.Ignored = false)
.AndTheRemaining()
.Have(c => c.Ignored = true)
.Build().ToList();
.All()
.With(c => c.SeriesId = 10)
.And(c => c.SeasonNumber = 1)
.And(c => c.Ignored = true)
.TheFirst(2)
.With(c => c.Ignored = false)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -1032,10 +1030,10 @@ public void IgnoreEpisode_Ignore()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = false)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -1060,10 +1058,10 @@ public void IgnoreEpisode_RemoveIgnore()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = true)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -1088,10 +1086,10 @@ public void IgnoreSeason_Ignore()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = false)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -1116,10 +1114,10 @@ public void IgnoreSeason_RemoveIgnore()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = true)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -1144,13 +1142,12 @@ public void IgnoreSeason_Ignore_Half()
mocker.SetConstant(db);
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.WhereTheFirst(2)
.Have(c => c.Ignored = false)
.AndTheRemaining()
.Have(c => c.Ignored = true)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.Ignored = true)
.TheFirst(2)
.With(c => c.Ignored = false)
.Build().ToList();
episodes.ForEach(c => db.Insert(c));
@ -1179,27 +1176,25 @@ public void EpisodesWithoutFiles_no_specials()
.Build();
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true)
.WhereTheFirst(2)
.Have(c => c.EpisodeFileId = 0)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.AirDate = DateTime.Today.AddDays(-4))
.With(c => c.Ignored = true)
.TheFirst(2)
.With(c => c.EpisodeFileId = 0)
.WhereSection(1, 2)
.Have(c => c.Ignored = false)
.With(c => c.Ignored = false)
.Build().ToList();
var specials = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 0)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.EpisodeFileId = 0)
.WhereTheFirst(1)
.Have(c => c.Ignored = true)
.AndTheRemaining()
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 0)
.With(c => c.AirDate = DateTime.Today.AddDays(-4))
.With(c => c.EpisodeFileId = 0)
.With(c => c.Ignored = false)
.TheFirst(1).With(c => c.Ignored = true)
.Build().ToList();
db.Insert(series);
@ -1228,27 +1223,26 @@ public void EpisodesWithoutFiles_with_specials()
.Build();
var episodes = Builder<Episode>.CreateListOfSize(4)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true)
.WhereTheFirst(2)
.Have(c => c.EpisodeFileId = 0)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.AirDate = DateTime.Today.AddDays(-4))
.With(c => c.Ignored = true)
.TheFirst(2)
.With(c => c.EpisodeFileId = 0)
.WhereSection(1, 2)
.Have(c => c.Ignored = false)
.With(c => c.Ignored = false)
.Build().ToList();
var specials = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 0)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.EpisodeFileId = 0)
.WhereTheFirst(1)
.Have(c => c.Ignored = true)
.AndTheRemaining()
.Have(c => c.Ignored = false)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 0)
.With(c => c.AirDate = DateTime.Today.AddDays(-4))
.With(c => c.EpisodeFileId = 0)
.With(c => c.Ignored = false)
.TheFirst(1)
.With(c => c.Ignored = true)
.Build().ToList();
db.Insert(series);
@ -1281,13 +1275,13 @@ public void EpisodesWithFiles_success()
.Build();
var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true)
.Have(c => c.EpisodeFile = episodeFile)
.Have(c => c.EpisodeFileId = episodeFile.EpisodeFileId)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.AirDate = DateTime.Today.AddDays(-4))
.With(c => c.Ignored = true)
.With(c => c.EpisodeFile = episodeFile)
.With(c => c.EpisodeFileId = episodeFile.EpisodeFileId)
.Build().ToList();
db.Insert(series);
@ -1323,12 +1317,12 @@ public void EpisodesWithFiles_no_files()
.Build();
var episodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.AirDate = DateTime.Today.AddDays(-4))
.Have(c => c.Ignored = true)
.Have(c => c.EpisodeFileId = 0)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.AirDate = DateTime.Today.AddDays(-4))
.With(c => c.Ignored = true)
.With(c => c.EpisodeFileId = 0)
.Build().ToList();
db.Insert(series);
@ -1355,10 +1349,10 @@ public void GetEpisodesByFileId_multi_episodes()
.Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.EpisodeFileId = 12345)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.With(c => c.EpisodeFileId = 12345)
.Build();
db.Insert(series);
@ -1409,9 +1403,9 @@ public void IsFirstOrLastEpisodeInSeason_false()
mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.Build();
db.InsertMany(fakeEpisodes);
@ -1431,9 +1425,9 @@ public void IsFirstOrLastEpisodeInSeason_true_first()
mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.Build();
db.InsertMany(fakeEpisodes);
@ -1453,9 +1447,9 @@ public void IsFirstOrLastEpisodeInSeason_true_last()
mocker.SetConstant(db);
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.SeriesId = 10)
.Have(c => c.SeasonNumber = 1)
.All()
.With(c => c.SeriesId = 10)
.With(c => c.SeasonNumber = 1)
.Build();
db.InsertMany(fakeEpisodes);
@ -1485,10 +1479,10 @@ public void SetPostDownloadStatus(string folderName, PostDownloadStatusType post
.Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(episodeCount)
.WhereAll()
.Have(c => c.SeriesId = 12345)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.All()
.With(c => c.SeriesId = 12345)
.With(c => c.SeasonNumber = 1)
.With(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.Build();
db.Insert(fakeSeries);
@ -1519,10 +1513,10 @@ public void SetPostDownloadStatus_Invalid_EpisodeId()
.Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(1)
.WhereAll()
.Have(c => c.SeriesId = 12345)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.All()
.With(c => c.SeriesId = 12345)
.With(c => c.SeasonNumber = 1)
.With(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.Build();
db.Insert(fakeSeries);
@ -1531,7 +1525,7 @@ public void SetPostDownloadStatus_Invalid_EpisodeId()
mocker.GetMock<SeriesProvider>().Setup(s => s.FindSeries("officeus")).Returns(fakeSeries);
//Act
mocker.Resolve<EpisodeProvider>().SetPostDownloadStatus(new List<int>{300}, postDownloadStatus);
mocker.Resolve<EpisodeProvider>().SetPostDownloadStatus(new List<int> { 300 }, postDownloadStatus);
//Assert
var result = db.Fetch<Episode>();

View file

@ -31,8 +31,8 @@ public void Delete_None_Valid_TvDbEpisodeId()
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build())
).With(c => c.Id = seriesId).Build();
@ -71,8 +71,8 @@ public void Delete_None_TvDbEpisodeId_is_zero()
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build())
).With(c => c.Id = seriesId).Build();
@ -111,8 +111,8 @@ public void Delete_None_TvDbEpisodeId_is_null()
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build())
).With(c => c.Id = seriesId).Build();
@ -151,8 +151,8 @@ public void Delete_TvDbId()
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build())
).With(c => c.Id = seriesId).Build();
@ -194,8 +194,8 @@ public void Delete_TvDbId_multiple_series()
var tvDbSeries = Builder<TvdbSeries>.CreateNew().With(
c => c.Episodes =
new List<TvdbEpisode>(Builder<TvdbEpisode>.CreateListOfSize(episodeCount).
WhereAll()
.Have(l => l.Language = new TvdbLanguage(0, "eng", "a"))
All()
.With(l => l.Language = new TvdbLanguage(0, "eng", "a"))
.Build())
).With(c => c.Id = seriesId).Build();

View file

@ -234,5 +234,31 @@ public void Get_Multi_Episode_Zero_Doesnt_Exist_Should_not_add_ignored()
db.Fetch<Episode>().Should().HaveCount(2);
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();
}
}
}

View file

@ -45,7 +45,7 @@ public void AllItemsWithRelationships()
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 db = MockLib.GetEmptyDatabase();
@ -95,8 +95,8 @@ public void Trim_Items()
{
//Setup
var historyItem = Builder<History>.CreateListOfSize(20)
.WhereTheFirst(10).Have(c => c.Date = DateTime.Now)
.AndTheNext(10).Have(c => c.Date = DateTime.Now.AddDays(-31))
.TheFirst(10).With(c => c.Date = DateTime.Now)
.AndTheNext(10).With(c => c.Date = DateTime.Now.AddDays(-31))
.Build();
var mocker = new AutoMoqer();

View file

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

View file

@ -28,10 +28,10 @@ public class MediaFileProviderTests : TestBase
public void get_series_files()
{
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)
.WhereAll().Have(s => s.SeriesId = 20).Build();
.All().With(s => s.SeriesId = 20).Build();
var mocker = new AutoMoqer();
@ -53,15 +53,15 @@ public void get_series_files()
public void get_season_files()
{
var firstSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
.WhereAll()
.Have(s => s.SeriesId = 12)
.Have(s => s.SeasonNumber = 1)
.All()
.With(s => s.SeriesId = 12)
.With(s => s.SeasonNumber = 1)
.Build();
var secondSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
.WhereAll()
.Have(s => s.SeriesId = 12)
.Have(s => s.SeasonNumber = 2)
.All()
.With(s => s.SeriesId = 12)
.With(s => s.SeasonNumber = 2)
.Build();
var mocker = new AutoMoqer();

View file

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

View file

@ -36,11 +36,12 @@
<Reference Include="Accessibility">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="FizzWare.NBuilder">
<HintPath>..\packages\NBuilder.2.3.0.0\lib\FizzWare.NBuilder.dll</HintPath>
<Reference Include="FizzWare.NBuilder, Version=3.0.1.0, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NBuilder.3.0.1\lib\FizzWare.NBuilder.dll</HintPath>
</Reference>
<Reference Include="FluentAssertions">
<HintPath>..\Libraries\FluentAssertions.dll</HintPath>
<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>
</Reference>
<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>
@ -60,8 +61,7 @@
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libraries\NLog.dll</HintPath>
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>

View file

@ -41,10 +41,10 @@ public void ProcessFailedOrUnpackingDownload(string folderName, PostDownloadStat
.Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(episodeCount)
.WhereAll()
.Have(c => c.SeriesId = 12345)
.Have(c => c.SeasonNumber = 1)
.Have(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.All()
.With(c => c.SeriesId = 12345)
.With(c => c.SeasonNumber = 1)
.With(c => c.PostDownloadStatus = PostDownloadStatusType.Unknown)
.Build();
var expectedEpisodesNumbers = fakeEpisodes.Select(e => e.EpisodeId).ToList();
@ -200,8 +200,8 @@ public void ProcessDownload_Unknown_Error()
.Build();
var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll()
.Have(f => f.SeriesId = fakeSeries.SeriesId)
.All()
.With(f => f.SeriesId = fakeSeries.SeriesId)
.Build().ToList();
//Act
@ -230,8 +230,8 @@ public void ProcessDownload_Success()
.Build();
var fakeEpisodeFiles = Builder<EpisodeFile>.CreateListOfSize(2)
.WhereAll()
.Have(f => f.SeriesId = fakeSeries.SeriesId)
.All()
.With(f => f.SeriesId = fakeSeries.SeriesId)
.Build().ToList();
//Act

View file

@ -55,7 +55,7 @@ public void processResults_ParseResult_should_return_after_match()
public void processResults_higher_quality_should_be_called_first()
{
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))
.Build();
@ -91,7 +91,7 @@ public void processResults_higher_quality_should_be_called_first()
public void processResults_when_same_quality_proper_should_be_called_first()
{
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))
.Build();

View file

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

View file

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

View file

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

View file

@ -33,7 +33,7 @@ public void Add_new_series(bool useSeasonFolder)
var fakeProfiles = Builder<QualityProfile>.CreateListOfSize(2).Build();
db.InsertMany(fakeProfiles);
const string path = "C:\\Test\\";
const int tvDbId = 1234;
const int qualityProfileId = 2;
@ -216,13 +216,13 @@ public void Get_Series_With_Count()
var fakeQuality = Builder<QualityProfile>.CreateNew().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 = false)
.Have(e => e.AirDate = DateTime.Today)
.WhereTheFirst(5)
.Have(e => e.EpisodeFileId = 0)
.All().With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.Ignored = false)
.With(e => e.AirDate = DateTime.Today)
.TheFirst(5)
.With(e => e.EpisodeFileId = 0)
.WhereTheLast(2)
.Have(e => e.AirDate = DateTime.Today.AddDays(1))
.With(e => e.AirDate = DateTime.Today.AddDays(1))
.Build();
db.Insert(fakeSeries);
@ -248,7 +248,7 @@ public void Get_Series_With_Count_AllIgnored()
var fakeQuality = Builder<QualityProfile>.CreateNew().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(fakeQuality);
@ -274,10 +274,10 @@ public void Get_Series_With_Count_AllDownloaded()
var fakeQuality = Builder<QualityProfile>.CreateNew().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 = false)
.Have(e => e.AirDate = DateTime.Today.AddDays(-1))
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.Ignored = false)
.With(e => e.AirDate = DateTime.Today.AddDays(-1))
.Build();
db.Insert(fakeSeries);
@ -304,13 +304,13 @@ public void Get_Series_With_Count_Half_Ignored()
var fakeQuality = Builder<QualityProfile>.CreateNew().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.AirDate = DateTime.Today.AddDays(-1))
.WhereTheFirst(5)
.Have(e => e.Ignored = false)
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.AirDate = DateTime.Today.AddDays(-1))
.TheFirst(5)
.With(e => e.Ignored = false)
.WhereTheLast(5)
.Have(e => e.Ignored = true)
.With(e => e.Ignored = true)
.Build();
db.Insert(fakeSeries);
@ -362,10 +362,10 @@ public void SeriesPathExists_exact_match()
var path = @"C:\Test\TV\30 Rock";
var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.QualityProfileId = 1)
.WhereTheFirst(1)
.Have(c => c.Path = path)
.All()
.With(c => c.QualityProfileId = 1)
.TheFirst(1)
.With(c => c.Path = path)
.Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -375,7 +375,7 @@ public void SeriesPathExists_exact_match()
//Act
mocker.Resolve<QualityProvider>();
//mocker.GetMock<IDatabase>().Setup(s => s.Fetch<Series, QualityProfile>(It.IsAny<string>())).Returns(
//fakeSeries.ToList());
//fakeSeries.ToList());
var result = mocker.Resolve<SeriesProvider>().SeriesPathExists(path);
@ -393,10 +393,10 @@ public void SeriesPathExists_match()
var path = @"C:\Test\TV\30 Rock";
var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.QualityProfileId = 1)
.WhereTheFirst(1)
.Have(c => c.Path = path)
.All()
.With(c => c.QualityProfileId = 1)
.TheFirst(1)
.With(c => c.Path = path)
.Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -424,10 +424,10 @@ public void SeriesPathExists_match_alt()
var path = @"C:\Test\TV\The Simpsons";
var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.QualityProfileId = 1)
.WhereTheFirst(1)
.Have(c => c.Path = path)
.All()
.With(c => c.QualityProfileId = 1)
.TheFirst(1)
.With(c => c.Path = path)
.Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -455,10 +455,10 @@ public void SeriesPathExists_match_false()
var path = @"C:\Test\TV\30 Rock";
var fakeSeries = Builder<Series>.CreateListOfSize(10)
.WhereAll()
.Have(c => c.QualityProfileId = 1)
.WhereTheFirst(1)
.Have(c => c.Path = path)
.All()
.With(c => c.QualityProfileId = 1)
.TheFirst(1)
.With(c => c.Path = path)
.Build();
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
@ -486,13 +486,12 @@ public void Get_Series_NextAiring_Today()
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false)
.WhereTheFirst(1)
.Have(e => e.AirDate = DateTime.Today)
.AndTheRemaining()
.Have(e => e.AirDate = DateTime.Today.AddDays(1))
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.Ignored = false)
.With(e => e.AirDate = DateTime.Today.AddDays(1))
.TheFirst(1)
.With(e => e.AirDate = DateTime.Today)
.Build();
db.Insert(fakeSeries);
@ -518,13 +517,12 @@ public void Get_Series_NextAiring_Tomorrow_Last_Aired_Yesterday()
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false)
.WhereTheFirst(1)
.Have(e => e.AirDate = DateTime.Today.AddDays(-1))
.AndTheRemaining()
.Have(e => e.AirDate = DateTime.Today.AddDays(1))
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.Ignored = false)
.With(e => e.AirDate = DateTime.Today.AddDays(1))
.TheFirst(1)
.With(e => e.AirDate = DateTime.Today.AddDays(-1))
.Build();
db.Insert(fakeSeries);
@ -550,10 +548,10 @@ public void Get_Series_NextAiring_Unknown()
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.AirDate = null)
.Have(e => e.Ignored = false)
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.AirDate = null)
.With(e => e.Ignored = false)
.Build();
db.Insert(fakeSeries);
@ -579,13 +577,12 @@ public void Get_Series_NextAiring_1_month()
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(e => e.SeriesId = fakeSeries.SeriesId)
.Have(e => e.Ignored = false)
.WhereTheFirst(1)
.Have(e => e.AirDate = DateTime.Today.AddDays(-1))
.AndTheRemaining()
.Have(e => e.AirDate = DateTime.Today.AddMonths(1))
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.Ignored = false)
.With(e => e.AirDate = DateTime.Today.AddMonths(1))
.TheFirst(1)
.With(e => e.AirDate = DateTime.Today.AddDays(-1))
.Build();
db.Insert(fakeSeries);
@ -611,14 +608,13 @@ public void Get_Series_NextAiring_skip_ignored()
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
.WhereAll()
.Have(e => e.SeriesId = fakeSeries.SeriesId)
.WhereTheFirst(1)
.Have(e => e.AirDate = DateTime.Today.AddDays(1))
.Have(e => e.Ignored = true)
.AndTheRemaining()
.Have(e => e.AirDate = DateTime.Today.AddMonths(1))
.Have(e => e.Ignored = false)
.All()
.With(e => e.SeriesId = fakeSeries.SeriesId)
.With(e => e.AirDate = DateTime.Today.AddMonths(1))
.With(e => e.Ignored = false)
.TheFirst(1)
.With(e => e.AirDate = DateTime.Today.AddDays(1))
.With(e => e.Ignored = true)
.Build();
db.Insert(fakeSeries);

View file

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

View file

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NBuilder" version="2.3.0.0" />
<package id="AutoMoq" version="1.3.1.3" />
<package id="Moq" version="4.0.10827" />
<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="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>

View file

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

View file

@ -125,6 +125,9 @@ public virtual IList<Episode> GetEpisodesByParseResult(EpisodeParseResult parseR
{
var result = new List<Episode>();
if (parseResult.EpisodeNumbers == null)
return result;
foreach (var episodeNumber in parseResult.EpisodeNumbers)
{
var episodeInfo = GetEpisode(parseResult.Series.SeriesId, parseResult.SeasonNumber, episodeNumber);
@ -159,7 +162,7 @@ public virtual IList<Episode> GetEpisodesByParseResult(EpisodeParseResult parseR
}
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);
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

14286
packages/NLog.2.0.0.2000/lib/net20/NLog.xml vendored Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

14403
packages/NLog.2.0.0.2000/lib/net35/NLog.xml vendored Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -1348,6 +1348,13 @@
<param name="section">Section XML node.</param>
<returns>The created section handler object.</returns>
</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">
<summary>
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"/>.
</summary>
</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">
<summary>
Gets the <see cref="T:NLog.Targets.Target"/> factory.
@ -2500,7 +2515,7 @@
Gets the Global Diagnostics Context named item.
</summary>
<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 name="M:NLog.GDC.Contains(System.String)">
<summary>
@ -2537,7 +2552,7 @@
Gets the Global Diagnostics Context named item.
</summary>
<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 name="M:NLog.GlobalDiagnosticsContext.Contains(System.String)">
<summary>
@ -2701,7 +2716,7 @@
Gets or sets the <see cref="T:System.Object"/> with the specified key.
</summary>
<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 name="T:NLog.Internal.DictionaryAdapter`2.MyEnumerator">
<summary>
@ -3668,6 +3683,26 @@
Detects the platform the NLog is running on.
</summary>
</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">
<summary>
Portable implementation of <see cref="T:NLog.Internal.FileInfoHelper"/>.
@ -3914,6 +3949,27 @@
</summary>
<value>The next item in the chain.</value>
</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">
<summary>
Wraps <see cref="T:NLog.Common.AsyncContinuation"/> with a timeout.
@ -5630,6 +5686,29 @@
</summary>
<docgen category='Advanced Options' order='10' />
</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">
<summary>
Converts the result of another layout output to lower case.
@ -6122,6 +6201,16 @@
<param name="logEvent">The logging event.</param>
<returns>The rendered layout.</returns>
</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">
<summary>
Gets the logging configuration this target is part of.
@ -9931,7 +10020,7 @@
Gets the current thread MDC named item.
</summary>
<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 name="M:NLog.MappedDiagnosticsContext.Contains(System.String)">
<summary>
@ -9968,7 +10057,7 @@
Gets the current thread MDC named item.
</summary>
<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 name="M:NLog.MDC.Contains(System.String)">
<summary>
@ -10565,7 +10654,7 @@
<img src="examples/targets/Screenshots/Network/Output.gif" />
<p>
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
so that your application threads will not be blocked by the timing-out connection attempts.
</p>
@ -10616,14 +10705,16 @@
<remarks>
The network address can be:
<ul>
<li>tcp://host:port - TCP (auto select IPv4/IPv6)</li>
<li>tcp4://host:port - force TCP/IPv4</li>
<li>tcp6://host:port - force TCP/IPv6</li>
<li>udp://host:port - UDP (auto select IPv4/IPv6, not supported on Silverlight)</li>
<li>udp4://host:port - force UDP/IPv4 (not supported on Silverlight)</li>
<li>udp6://host:port - force UDP/IPv6 (not supported on Silverlight)</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 (not supported on Windows Phone 7.0)</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 and on Windows Phone 7.0)</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 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>
For HTTP Support use WebService target.
For SOAP-based webservice support over HTTP use WebService target.
</remarks>
<docgen category='Connection Options' order='10' />
</member>

Binary file not shown.

9119
packages/NLog.2.0.0.2000/lib/sl2/NLog.xml vendored Normal file

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.

9141
packages/NLog.2.0.0.2000/lib/sl3/NLog.xml vendored Normal file

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.

9542
packages/NLog.2.0.0.2000/lib/sl4/NLog.xml vendored Normal file

File diff suppressed because it is too large Load diff