示例#1
0
        public void CommentToGame_ValidComment_RedirectToActionResult()
        {
            var fakeCommentViewModel = new CommentViewModel()
            {
                Name       = "test",
                Body       = "test",
                FilterGame = new FilterGameViewModel()
            };
            var fakeCommentDTO = _mapper.Map <CommentDTO>(fakeCommentViewModel);

            _commentService.Setup(service => service.AddComment(fakeCommentDTO));

            var res = _sut.CommentToGame(fakeCommentViewModel);

            Assert.IsType <PartialViewResult>(res);
        }