public void Get_returns_items_correctly() { var service = new NetworkService(); var result = service.GetAsync <MovieSearchResults>(MovieUtils.GetUri("s", "avengers")).Result; Assert.True(result.Search.Count > 0 && result.Search[0].Title != null && result.Search[0].Title.Length > 0); }
public override async Task InitializeAsync(object parameter) { var movie = parameter as Movie; var allMovies = await _repository.GetAllAsync(); if (allMovies != null && allMovies.Count > 0) { var imdbMovie = allMovies.FirstOrDefault(m => m.imdbID == movie.imdbID); if (imdbMovie != null) { Movie = imdbMovie; FavouriteIconState = imdbMovie.IsFavourite; return; } } Movie = await _networkService.GetAsync <ImdbMovie>(MovieUtils.GetUri("i", movie.imdbID)); }