public void CommentRepository_CreateLike_CreatesOneAndOnlyOneCommentLikePerUser() { //arrange ICommentRepo cr = GetInMemoryCommentRepository(); //act cr.Add(comment); cr.CreateLike(1, 1); //user 1 likes comment 1 cr.CreateLike(1, 1); //if user 1 likes the same comment again, won't cause exception //assert Assert.True(true); }
public IActionResult CommentLike(int commentId, int userId) { _commentRepository.CreateLike(commentId, userId); return(Ok()); }