Esempio n. 1
0
    public void TestName()
    {
        //Given
        ICommentData commentData = new CommentData();
        Comment      userComment = new Comment()
        {
            Id = 8, Message = "Just replying"
        };
        Comment userComment1 = new Comment()
        {
            Id = 9, Message = "Just replying"
        };
        Comment userComment2 = new Comment()
        {
            Id = 10, Message = "Just replying"
        };

        var comment = commentData.GetCommentById(1);

        comment.Replies.Append(userComment).ToList();
        comment.Replies.Append(userComment1).ToList();
        comment.Replies.Append(userComment2).ToList();

        //When
        //Then
        Assert.Equal(2, comment.Replies.Count());
    }