示例#1
0
        public async Task AddComment_When_ArticleViewModel_HasNoErrors_Should_RedirectToAction_Article()
        {
            mapperMock.Setup(x => x.Map <CommentViewModel, Comment>(It.IsAny <CommentViewModel>()))
            .Returns(MockData.TestArticleCommentMock());

            var result = await appController.AddComment(new ArticleViewModel()) as RedirectToActionResult;

            result.Should().BeOfType <RedirectToActionResult>().Which.ActionName.Should().Be("Article");
        }