public void Is_PartlyAvailable_When_All_We_Have_Some_Aired_Episodes()
        {
            var episodes = new List <EpisodeRequests>
            {
                new EpisodeRequests
                {
                    AirDate   = DateTime.Now.AddDays(-1), // Yesterday
                    Available = true
                },
                new EpisodeRequests
                {
                    AirDate   = DateTime.Now.AddDays(-14), // Yesterday
                    Available = false
                },
                new EpisodeRequests
                {
                    AirDate   = DateTime.MinValue, // Unknown date!
                    Available = false
                }
            };

            var model = new SearchTvShowViewModel
            {
                SeasonRequests = new List <SeasonRequests> {
                    new SeasonRequests {
                        Episodes = episodes
                    }
                }
            };

            AvailabilityRuleHelper.CheckForUnairedEpisodes(model);
            Assert.That(model.FullyAvailable, Is.False);
            Assert.That(model.PartlyAvailable, Is.True);
        }
        public void Is_NotAvailable_When_All_Episodes_Are_Unknown()
        {
            var episodes = new List <EpisodeRequests>
            {
                new EpisodeRequests
                {
                    AirDate   = DateTime.MinValue,
                    Available = false
                },
                new EpisodeRequests
                {
                    AirDate   = DateTime.MinValue,
                    Available = false
                },
                new EpisodeRequests
                {
                    AirDate   = DateTime.MinValue, // Unknown date!
                    Available = false
                }
            };

            var model = new SearchTvShowViewModel
            {
                SeasonRequests = new List <SeasonRequests> {
                    new SeasonRequests {
                        Episodes = episodes
                    }
                }
            };

            AvailabilityRuleHelper.CheckForUnairedEpisodes(model);
            Assert.That(model.FullyAvailable, Is.False);
            Assert.That(model.PartlyAvailable, Is.False);
        }