コード例 #1
0
        public async void Get_Movies_From_Filters()
        {
            //Arrange
            var expectedMoviesCity = BuildMovieInfosListFromCity();

            _repository.GetMoviesInfo(true).Returns(expectedMoviesCity);

            var expectedMoviesFilters = BuildMovieInfosListFromFilters();

            _repository.GetMoviesInfo(false).Returns(expectedMoviesFilters);

            var controller = new ManagersController(_repository, _weekDates, _logger);

            //Act
            var result = await controller.GetIntelligentBillboard(1, 1, 1, false);

            //Assert
            var typedResultGet = (List <V1.IntelligentBillboardResponse>)Assert.IsType <OkObjectResult>(result).Value;

            typedResultGet.Should().Match <List <V1.IntelligentBillboardResponse> >(m => m.First().BigScreensMovies != null);
            typedResultGet.Should().Match <List <V1.IntelligentBillboardResponse> >(m => m.First().BigScreensMovies.First().Movie.Title == "Boogie-Man");
        }