public void GetMoviesIds_WhenParsingCorrectPage(string title) { var page = KinopoiskWebPage.GetMovieSearchPageAsync(title).Result; var moviesIds = KinopoiskWebPage.GetMoviesIds(page); moviesIds.Should().NotBeEmpty(); }
public void ThrowException_WhenSearchFakeMovie(string title) { new Action(() => Task.WaitAll(KinopoiskWebPage.GetMovieSearchPageAsync(title))) .ShouldThrow <ArgumentException>().WithMessage("Movie not found"); }
public void GetHtmlPageWithSearchResult_WhenSearchRealMovie(string title) { var page = KinopoiskWebPage.GetMovieSearchPageAsync(title).Result; page.StartsWith("<!DOCTYPE html").Should().BeTrue(); }