public void DeleteCommentSuccess() { int id = CommentDB.GetCommentsByPostId(active, 1)[0].Id; int oldNumberOfCommentsByPostId = CommentDB.GetCommentsByPostId(active, 1).Count; CommentDB.DeleteComment(id); int newNumberOfCommentsByPostId = CommentDB.GetCommentsByPostId(active, 1).Count; Assert.AreEqual(oldNumberOfCommentsByPostId - 1, newNumberOfCommentsByPostId); }
public void DeleteCommentFailed() { int id = 100; int oldNumberOfCommentsByPostId = CommentDB.GetCommentsByPostId(active, 1).Count; CommentDB.DeleteComment(id); int newNumberOfCommentsByPostId = CommentDB.GetCommentsByPostId(active, 1).Count; Assert.AreEqual(oldNumberOfCommentsByPostId, newNumberOfCommentsByPostId); }
public void DeleteCommentFailed() { Guid id = Guid.NewGuid(); int oldNumberOfCommentsByPostId = CommentDB.GetCommentsByPostId(active, post_id).Count; CommentDB.DeleteComment(id); int newNumberOfCommentsByPostId = CommentDB.GetCommentsByPostId(active, post_id).Count; Assert.AreEqual(oldNumberOfCommentsByPostId, newNumberOfCommentsByPostId); }
public void DeleteComment(int id) { CommentDB.DeleteComment(id); }
public void DeleteComment(Guid id) { CommentDB.DeleteComment(id); }