public void MovieDetail() { using (var httpTest = new HttpTest()) { var detail = new DetailRepo(); var result = detail.GetMovieDetail("Guardians of the Galaxy"); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(Task <List <MovieDetail> >)); httpTest.ShouldHaveCalled("http://www.omdbapi.com").WithVerb(HttpMethod.Get); } }
public void OnGet(int id) { Product = DetailRepo.GetProduct(id); validReviews = DetailRepo.GetReviewsOnProduct(id); }