Ejemplo n.º 1
0
        public void GetAllCommentsByPostIdTest_Null_ReturnEqual()
        {
            //Arrange
            CommentContainer commentcontainer = new CommentContainer();
            List <Comment>   expectedcomments = new List <Comment>();

            //Act
            commentcontainer.GetAllCommentsByPostId(1);
            List <Comment> resultcomments = commentcontainer.Comments;

            //Assert
            CollectionAssert.AreEquivalent(expectedcomments, resultcomments);
        }
Ejemplo n.º 2
0
        public void GetAllCommentsByPostIdTest_NotNull_ReturnEqual()
        {
            //Arrange
            CommentContainer commentcontainer = new CommentContainer();

            //Act
            commentcontainer.GetAllCommentsByPostId(2);
            List <Comment> resultcomments = commentcontainer.Comments;

            //Assert
            CollectionAssert.AllItemsAreUnique(resultcomments);
            CollectionAssert.AllItemsAreNotNull(resultcomments);
        }