public void InsertCommentFailed()
        {
            Comment comment = new Comment
            {
                TextComment = "",
                UserId      = "user_1",
                PostId      = "post_1",
                Active      = true
            };

            Assert.IsNull(CommentDB.InsertComment(comment));
        }
        public void InsertCommentSuccess()
        {
            Comment comment = new Comment
            {
                TextComment = "new text comment",
                UserId      = "user_1",
                PostId      = "post_1",
                Active      = true
            };

            Assert.IsNotNull(CommentDB.InsertComment(comment));
        }
        public void InsertCommentFailed()
        {
            Comment comment = new Comment
            {
                Text       = "",
                Date       = new DateTime(2018, 2, 1, 5, 0, 0),
                Attachment = Encoding.ASCII.GetBytes("dodatak"),
                PostId     = 3,
                UserId     = 2,
                Active     = true
            };

            Assert.IsNull(CommentDB.InsertComment(comment));
        }
 public Comment InsertComment([FromBody] Comment comment)
 {
     return(CommentDB.InsertComment(comment));
 }