Пример #1
0
        public async Task <IActionResult> Index()
        {
            var movieList = await _omdbService.GetListByTitleAsync("&s=hello");

            if (movieList.Movies != null && movieList.Movies.Length > 0)
            {
                return(View(movieList));
            }
            else
            {
                return(View(new MovieList {
                    Movies = null
                }));
            }
        }
Пример #2
0
        public void Test_Imdb_Movie_List_Is_Not_Empty()
        {
            var movieList = _omdbService.GetListByTitleAsync("&s=hello");

            Assert.IsTrue(movieList.Result.Movies.Length > 0);
        }