Beispiel #1
0
        public async Task ConfirmDeletePost_Ok()
        {
            var post = new PostViewModel {
                Id = 1
            };
            await _controller.ConfirmDeletePost(post);

            _postManager.Verify(repo => repo.DeletePost(1), Times.Once);

            _postManager.Verify(repo =>
                                repo.DeletePost(It.Is <int>(id => id == post.Id)));
        }