Ejemplo n.º 1
0
        public void GetLaneInfo_should_display_only_the_branch_from_detected_merge_node_in_a_tree()
        {
            // synthetic test tree which does not need the right junction of merges
            //
            // merge
            // |     \
            // inner  (omitted)
            // |
            // undetected merge
            // |               \
            // real             (omitted)
            int maxScoreIsIgnored;

            _mergeCommitNode.AddParent(_innerCommitNode, out maxScoreIsIgnored);
            _innerCommitNode.AddParent(_undetectedMergeCommitNode, out maxScoreIsIgnored);
            _undetectedMergeCommitNode.AddParent(_realCommitNode, out maxScoreIsIgnored);
            _laneNodeLocator.FindPrevNode(Arg.Any <int>(), Arg.Any <int>()).Returns(x => (_realCommitNode, isAtNode: false));

            string subject    = MergeSubjectsWithDecoding[0];
            string mergedWith = MergeSubjectsWithDecoding[1];
            string into       = MergeSubjectsWithDecoding[2];

            _mergeCommitNode.GitRevision.Subject = subject;

            GetLaneInfo_should_display(_realCommitNode, into);
        }
Ejemplo n.º 2
0
        public void GetLaneInfo_should_prefer_the_branch_from_merge_to_a_GitRef__at_inner_node()
        {
            // synthetic test tree which does not need the right junction of merges
            //
            // artificial
            // |
            // merge
            // |    \
            // real  (omitted or maybe even missing)
            int maxScoreIsIgnored;

            _artificialCommitNode.AddParent(_mergeCommitNode, out maxScoreIsIgnored);
            _mergeCommitNode.AddParent(_realCommitNode, out maxScoreIsIgnored);

            GetLaneInfo_should_prefer_the_branch_from_merge_to_a_GitRef();
        }
Ejemplo n.º 3
0
        public void GetLaneInfo_should_display_only_the_branch_from_next_merge_node()
        {
            int maxScoreIsIgnored;

            _mergeCommitNode.AddParent(_realCommitNode, out maxScoreIsIgnored);
            _laneNodeLocator.FindPrevNode(Arg.Any <int>(), Arg.Any <int>()).Returns(x => (_realCommitNode, isAtNode: false));

            for (int index = 0; index < MergeSubjectsWithDecoding.Count; index += 3)
            {
                string subject    = MergeSubjectsWithDecoding[index + 0];
                string mergedWith = MergeSubjectsWithDecoding[index + 1];
                string into       = MergeSubjectsWithDecoding[index + 2];
                _mergeCommitNode.GitRevision.Subject = subject;

                GetLaneInfo_should_display(_realCommitNode, into);
            }
        }