Beispiel #1
0
        private CommitStub CreateCommitWithAuthor()
        {
            SignatureStub author = new SignatureStub {
                Name = AuthorName, EMail = AuthorEMail, When = _authorWhen
            };
            CommitStub commit =
                new CommitStub {
                Author = author, Committer = author, Treeish = Treeish1, Message = Message
            };

            return(commit);
        }
Beispiel #2
0
        public void GivenNodeWithDifferentCommitter_ThenReturnsExpectedText()
        {
            CommitStub    commit    = CreateCommitWithAuthor();
            SignatureStub committer =
                new SignatureStub {
                Name = CommitterName, EMail = CommitterEMail, When = _committerWhen
            };

            commit.Committer = committer;
            NodeStub node = new NodeStub(commit);

            GraphTooltipHelper helper = new GraphTooltipHelper();
            string             result = helper.MakeNodeTooltip(node);

            Assert.Equal(
                $"{Treeish1} - {Message}" +
                $"{LineSeparator}{AuthorName} @ {_authorWhen}" +
                $"{LineSeparator}Committed by: {CommitterName} @ {_committerWhen}",
                result);
        }