public void Test_DeleteComment_Call_Update_IsDeleted_True() { //arrange CommentService servise = new CommentService(_unitOfWork.Object); //act servise.DeleteComment(2); //assert _comments.Verify(c => c.Update(It.Is<Comment>(comment => comment.IsDeleted)), Times.Once()); }
public void Test_DeleteComment_Id_Less_Zero() { //arrange CommentService servise = new CommentService(_unitOfWork.Object); //act servise.DeleteComment(-1); }
public void Test_DeleteComment_Call_Delete() { //arrange CommentService servise = new CommentService(_unitOfWork.Object); //act servise.DeleteComment(1); //assert _comments.Verify( c => c.Delete(It.IsAny<Comment>()), Times.Once () ); }