@ -21,7 +21,6 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
private Series _unmonitoredSeries ;
private Series _unmonitoredSeries ;
private PagingSpec < Episode > _pagingSpec ;
private PagingSpec < Episode > _pagingSpec ;
private List < QualitiesBelowCutoff > _qualitiesBelowCutoff ;
private List < QualitiesBelowCutoff > _qualitiesBelowCutoff ;
private List < LanguagesBelowCutoff > _languagesBelowCutoff ;
private List < Episode > _unairedEpisodes ;
private List < Episode > _unairedEpisodes ;
[SetUp]
[SetUp]
@ -71,11 +70,6 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
new QualitiesBelowCutoff ( profile . Id , new [ ] { Quality . SDTV . Id } )
new QualitiesBelowCutoff ( profile . Id , new [ ] { Quality . SDTV . Id } )
} ;
} ;
_languagesBelowCutoff = new List < LanguagesBelowCutoff >
{
new LanguagesBelowCutoff ( profile . Id , new [ ] { Language . English . Id } )
} ;
var qualityMetLanguageUnmet = new EpisodeFile { RelativePath = "a" , Quality = new QualityModel { Quality = Quality . WEBDL480p } , Languages = new List < Language > { Language . English } } ;
var qualityMetLanguageUnmet = new EpisodeFile { RelativePath = "a" , Quality = new QualityModel { Quality = Quality . WEBDL480p } , Languages = new List < Language > { Language . English } } ;
var qualityMetLanguageMet = new EpisodeFile { RelativePath = "b" , Quality = new QualityModel { Quality = Quality . WEBDL480p } , Languages = new List < Language > { Language . Spanish } } ;
var qualityMetLanguageMet = new EpisodeFile { RelativePath = "b" , Quality = new QualityModel { Quality = Quality . WEBDL480p } , Languages = new List < Language > { Language . Spanish } } ;
var qualityMetLanguageExceed = new EpisodeFile { RelativePath = "c" , Quality = new QualityModel { Quality = Quality . WEBDL480p } , Languages = new List < Language > { Language . French } } ;
var qualityMetLanguageExceed = new EpisodeFile { RelativePath = "c" , Quality = new QualityModel { Quality = Quality . WEBDL480p } , Languages = new List < Language > { Language . French } } ;
@ -157,7 +151,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
{
{
GivenMonitoredFilterExpression ( ) ;
GivenMonitoredFilterExpression ( ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , _languagesBelowCutoff , false ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , false ) ;
spec . Records . Should ( ) . HaveCount ( 1 ) ;
spec . Records . Should ( ) . HaveCount ( 1 ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . EpisodeFile . Value . Quality . Quality = = Quality . SDTV ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . EpisodeFile . Value . Quality . Quality = = Quality . SDTV ) ;
@ -168,7 +162,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
{
{
GivenMonitoredFilterExpression ( ) ;
GivenMonitoredFilterExpression ( ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , _languagesBelowCutoff , false ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , false ) ;
spec . Records . Should ( ) . HaveCount ( 1 ) ;
spec . Records . Should ( ) . HaveCount ( 1 ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . Monitored ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . Monitored ) ;
@ -179,7 +173,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
{
{
GivenMonitoredFilterExpression ( ) ;
GivenMonitoredFilterExpression ( ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , _languagesBelowCutoff , false ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , false ) ;
spec . Records . Should ( ) . HaveCount ( 1 ) ;
spec . Records . Should ( ) . HaveCount ( 1 ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . Series . Monitored ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . Series . Monitored ) ;
@ -192,7 +186,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
GivenMonitoredFilterExpression ( ) ;
GivenMonitoredFilterExpression ( ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , _languagesBelowCutoff , false ) ;
var spec = Subject . EpisodesWhereCutoffUnmet ( _pagingSpec , _qualitiesBelowCutoff , false ) ;
spec . Records . Should ( ) . HaveCount ( 2 ) ;
spec . Records . Should ( ) . HaveCount ( 2 ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . Series . Monitored ) ;
spec . Records . Should ( ) . OnlyContain ( e = > e . Series . Monitored ) ;