Example #1
0
        public void addReviewByUser_valid()
        {
            /// Arrange
            var rateModel = new RatingDTO
            {
                Rating = 1
            };

            /// Act
            _repo.AddReviewByUser(rateModel, 2, 2);
            var review = _repo.GetReviewByUserForBook(2, 2);

            /// Assert
            Assert.IsNotNull(review);
        }
Example #2
0
        public ReviewViewModel AddReviewByUser(RatingDTO rating, int userID, int bookID)
        {
            var review = _repo.AddReviewByUser(rating, userID, bookID);

            return(review);
        }