Example #1
0
        public void GetMoviesIds_WhenParsingCorrectPage(string title)
        {
            var page      = KinopoiskWebPage.GetMovieSearchPageAsync(title).Result;
            var moviesIds = KinopoiskWebPage.GetMoviesIds(page);

            moviesIds.Should().NotBeEmpty();
        }
Example #2
0
 public void ThrowException_WhenSearchFakeMovie(string title)
 {
     new Action(() => Task.WaitAll(KinopoiskWebPage.GetMovieSearchPageAsync(title)))
     .ShouldThrow <ArgumentException>().WithMessage("Movie not found");
 }
Example #3
0
        public void GetHtmlPageWithSearchResult_WhenSearchRealMovie(string title)
        {
            var page = KinopoiskWebPage.GetMovieSearchPageAsync(title).Result;

            page.StartsWith("<!DOCTYPE html").Should().BeTrue();
        }