Example #1
0
        public void CreateCommentTest()
        {
            var repo    = new CommentRepo();
            var comment = new Comment()
            {
                BlogPostID     = 1,
                CommentContent = "This is a comment test",
                Status         = new Status()
                {
                    StatusID = 1
                },
                User     = new User(),
                Nickname = "Jake"
            };

            repo.CreateComment(comment);

            var list = repo.GetAllCommentsByPostID(1);

            Assert.AreEqual(1, list.Count);
        }