public void SaveCustomerReviews_ShouldThrow_ArgumentNullException()
        {
            // arrange

            // act
            var action = new Action(() => _customerReviewService.SaveCustomerReviews(null));

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
Ejemplo n.º 2
0
        public void SaveCustomerReviewsTest()
        {
            // Act
            _customerReviewService.SaveCustomerReviews(new CustomerReview[] { new CustomerReview() });

            // Assert
            _customerReviewRepoMock.Verify(c => c().Add(It.IsAny <CustomerReviewEntity>()), Times.Once);
            _customerReviewRepoMock.Verify(c => c().UnitOfWork.Commit(), Times.Once);
        }
Ejemplo n.º 3
0
 public IHttpActionResult Update(CustomerReview[] customerReviews)
 {
     _customerReviewService.SaveCustomerReviews(customerReviews);
     return(StatusCode(HttpStatusCode.NoContent));
 }