Exemplo n.º 1
0
        public void CommentIsAddedWithVisibilityGroup()
        {
            Sut.AddComment("foobar", "bar");

            connection.Received().Post(
                Arg.Is <AddCommentToIssueRequest>(x => x.RestResource.Contains("group=bar")));
        }
Exemplo n.º 2
0
        public void CommentsAreFetchedAgainAfterAddingComment()
        {
            connection.Get <CommentCollection>(Arg.Any <GetCommentsOfAnIssueRequest>()).Returns(commentCollection);

            IEnumerable <IComment> comments = Sut.Comments;

            Sut.AddComment("foobar");
            comments = Sut.Comments;

            connection.Received(2).Get <CommentCollection>(Arg.Any <GetCommentsOfAnIssueRequest>());
        }
Exemplo n.º 3
0
        public void ConnectionIsCalledWithAddComment()
        {
            Sut.AddComment("foobar");

            connection.Received().Post(Arg.Any <AddCommentToIssueRequest>());
        }