public List <ReviewDTO> GetReviewsByProductId(string productId) { ValidateProductId(productId); List <Review> reviews = reviewManager.GetReviewsByProduct(productId); return(BuildReviewDTOList(reviews)); }
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); }