Пример #1
0
        public void UpdateComment_UpdateCommentRepoWithThatComment()
        {
            //Arrange
            Comment updatedComment = new Comment();

            mapper.Map <CommentPatchDto, Comment>(testCommentPatchDto, updatedComment);
            commentRepositoryMock.Setup(x => x.GetById(testCommentPatchDto.Id)).Returns(updatedComment);

            //Act
            systemUnderTest.Patch(testCommentPatchDto);

            //Assert
            commentRepositoryMock.Verify(m => m.Update(updatedComment), Times.Once);
        }