コード例 #1
0
        public async Task <IEnumerable <ProductReviewDto> > GetReviews(int productId)
        {
            var productReviews = await _reviewManager.ProductReviews(productId);

            return(_mapper.Map <IEnumerable <ProductReviewDto> >(productReviews));
        }
コード例 #2
0
 public async Task GetReviews_Fails_When_Product_Does_Not_Exist()
 {
     const int productId = 235;
     await Assert.ThrowsAsync <ProductNotFound>(() => _reviewManager.ProductReviews(productId));
 }