public void Check_It_Returns_Empty_List_If_Does_Not_Match_Filter_Critea()
        {
            // Setup

            var noDrmRequest = new TvShowRequest
            {
                Drm          = false,
                EpisodeCount = 3
            };

            var zeroEpisodeCountRequest =
                new TvShowRequest
            {
                Drm          = true,
                EpisodeCount = 0
            };

            var tvShowService = new TvShowService();

            // Action
            var tvShowResp = tvShowService.GetFilteredTvShows(new List <TvShowRequest> {
                noDrmRequest, zeroEpisodeCountRequest
            });

            // Assert
            Assert.That(tvShowResp.Count, Is.EqualTo(0));
        }
        public void Check_Response_Contains_Correct_Info_From_Request()
        {
            // Setup
            var validRequest = new List <TvShowRequest>
            {
                new TvShowRequest
                {
                    Drm          = true,
                    EpisodeCount = 3,
                    Title        = "cool show",
                    Slug         = "sluginfo",
                    ImageRequest = new ImageRequest
                    {
                        ShowImage = "imageurl"
                    }
                }
            };

            var tvShowService = new TvShowService();

            // Action
            var tvShowResp = tvShowService.GetFilteredTvShows(validRequest);

            // Assert
            Assert.That(tvShowResp.Count, Is.EqualTo(1));
            Assert.That(tvShowResp.First().Title, Is.EqualTo(validRequest[0].Title));
            Assert.That(tvShowResp.First().Image, Is.EqualTo(validRequest[0].ImageRequest.ShowImage));
            Assert.That(tvShowResp.First().Slug, Is.EqualTo(validRequest[0].Slug));
        }
        public void Check_It_Returns_Empty_Response_List_If_Request_Is_Null()
        {
            // Setup
            var tvShowService = new TvShowService();

            // Action
            var tvShowResp = tvShowService.GetFilteredTvShows(null);

            // Assert
            Assert.That(tvShowResp.Count, Is.EqualTo(0));
        }
        public void Check_It_Correctly_Returns_If_Request_Is_Drm_Enabled_And_More_Than_One_Eposide()
        {
            // Setup
            var validRequest = new List <TvShowRequest>
            {
                new TvShowRequest
                {
                    Drm          = true,
                    EpisodeCount = 3,
                    Title        = "cool show",
                }
            };

            var tvShowService = new TvShowService();

            // Action
            var tvShowResp = tvShowService.GetFilteredTvShows(validRequest);

            // Assert
            Assert.That(tvShowResp.Count, Is.EqualTo(1));
            Assert.That(tvShowResp.First().Title, Is.EqualTo(validRequest[0].Title));
        }