Ejemplo n.º 1
0
        public void DeleteReviewShould_CallReviewsServiceMethodDeleteReview()
        {
            var placeServiceMock    = new Mock <IPlaceService>();
            var userServiceMock     = new Mock <IUserService>();
            var reviewsServiceMock  = new Mock <IReviewsService>();
            var questionServiceMock = new Mock <IQuestionService>();
            var authProviderMock    = new Mock <IAuthenticationProvider>();
            var factoryMock         = new Mock <IViewModelFactory>();

            var controller = new Areas.Administration.Controllers.AdministrationController(placeServiceMock.Object,
                                                                                           reviewsServiceMock.Object, authProviderMock.Object, userServiceMock.Object,
                                                                                           questionServiceMock.Object, factoryMock.Object);

            var id = Guid.NewGuid();

            controller.DeleteReview(id);

            reviewsServiceMock.Verify(s => s.DeleteReview(id), Times.Once);
        }