Example #1
0
 private void BuildCache()
 {
     for (int i = 0; i < _numberOfRevisionsAddedPerRun; i++)
     {
         // Cache in chunks
         _revisionGraph.CacheTo(_revisionGraph.GetCachedCount() + 30, _revisionGraph.GetCachedCount() + 10);
     }
 }
Example #2
0
 public void ShouldBeAbleToCacheGraphTo()
 {
     Assert.AreEqual(0, _revisionGraph.GetCachedCount());
     _revisionGraph.CacheTo(4, 2);
     Assert.AreEqual(3, _revisionGraph.GetCachedCount());
     _revisionGraph.CacheTo(4, 4);
     Assert.AreEqual(5, _revisionGraph.GetCachedCount());
     _revisionGraph.CacheTo(400, 400);
     Assert.AreEqual(6, _revisionGraph.GetCachedCount());
 }
Example #3
0
 public void ShouldBeAbleToCacheGraphTo()
 {
     Assert.AreEqual(0, _revisionGraph.GetCachedCount());
     _revisionGraph.CacheTo(4, 2);
     Assert.AreEqual(3, _revisionGraph.GetCachedCount());
     _revisionGraph.CacheTo(4, 4);
     Assert.AreEqual(5, _revisionGraph.GetCachedCount());
     _revisionGraph.CacheTo(400, 400);
     Assert.AreEqual(6, _revisionGraph.GetCachedCount());
     _revisionGraph.LoadingCompleted();
     Assert.AreEqual(6 + LookAhead, _revisionGraph.GetCachedCount());
 }