コード例 #1
0
        public List <ReviewDTO> GetReviewsByProductId(string productId)
        {
            ValidateProductId(productId);
            List <Review> reviews = reviewManager.GetReviewsByProduct(productId);

            return(BuildReviewDTOList(reviews));
        }
コード例 #2
0
        public void TestGetAllReviewByProduct()
        {
            Product productForReview = BuildProduct();

            userRepository.AddEntity(BuildUser());
            productRepository.AddEntity(productForReview);
            reviewManager.AddReview(request);
            Assert.AreNotEqual(reviewManager.GetReviewsByProduct(productForReview.ProductId).Count, ESportUtils.EMPTY_LIST);
        }