Пример #1
0
 public void ShouldBeAbleToHighlightBranch()
 {
     _revisionGraph.CacheTo(_revisionGraph.Count, _revisionGraph.Count);
     Assert.IsTrue(_revisionGraph.GetNodeForRow(0).IsRelative);
     Assert.IsTrue(_revisionGraph.GetNodeForRow(1).IsRelative);
     Assert.IsTrue(_revisionGraph.GetNodeForRow(4).IsRelative);
     _revisionGraph.HighlightBranch(_revisionGraph.GetNodeForRow(1).Objectid);
     Assert.IsFalse(_revisionGraph.GetNodeForRow(0).IsRelative);
     Assert.IsTrue(_revisionGraph.GetNodeForRow(1).IsRelative);
     Assert.IsTrue(_revisionGraph.GetNodeForRow(4).IsRelative);
 }
Пример #2
0
        private void Render()
        {
            for (int i = 0; i < _numberOfRevisionsAddedPerRun / 10; i++)
            {
                var pageStart = _random.Next(_revisionGraph.Count);

                for (int j = pageStart; j < pageStart + 4; j++)
                {
                    // Simulate render commit message
                    _revisionGraph.GetNodeForRow(j);

                    // Simulate render graph
                    _revisionGraph.GetSegmentsForRow(j)?.GetLaneCount();
                }
            }
        }