public virtual void setUp() { recursiveDelete(testName() + " (SetUp)", trash, false, true); mockSystemReader = new MockSystemReader(); mockSystemReader.userGitConfig = new FileBasedConfig(new FileInfo(Path.Combine(trash.FullName, "usergitconfig"))); SystemReader.setInstance(mockSystemReader); long now = mockSystemReader.getCurrentTime(); int tz = mockSystemReader.getTimezone(now); author = new PersonIdent("J. Author", "*****@*****.**"); author = new PersonIdent(author, now, tz); committer = new PersonIdent("J. Committer", "*****@*****.**"); committer = new PersonIdent(committer, now, tz); WindowCacheConfig c = new WindowCacheConfig(); c.PackedGitLimit = (128 * WindowCacheConfig.Kb); c.PackedGitWindowSize = (8 * WindowCacheConfig.Kb); c.PackedGitMMAP = (useMMAP); c.DeltaBaseCacheLimit = (8 * WindowCacheConfig.Kb); WindowCache.reconfigure(c); }
/** Increment the {@link #author} and {@link #committer} times. */ protected void tick() { long delta = (long)TimeSpan.FromMinutes(5).TotalMilliseconds; long now = author.When + delta; int tz = mockSystemReader.getTimezone(now); author = new PersonIdent(author, now, tz); committer = new PersonIdent(committer, now, tz); }
public virtual void setUp(){ recursiveDelete(testName() + " (SetUp)", trash, false, true); mockSystemReader = new MockSystemReader(); mockSystemReader.userGitConfig = new FileBasedConfig(new FileInfo(Path.Combine(trash.FullName, "usergitconfig"))); SystemReader.setInstance(mockSystemReader); long now = mockSystemReader.getCurrentTime(); int tz = mockSystemReader.getTimezone(now); author = new PersonIdent("J. Author", "*****@*****.**"); author = new PersonIdent(author, now, tz); committer = new PersonIdent("J. Committer", "*****@*****.**"); committer = new PersonIdent(committer, now, tz); WindowCacheConfig c = new WindowCacheConfig(); c.PackedGitLimit = (128 * WindowCacheConfig.Kb); c.PackedGitWindowSize = (8 * WindowCacheConfig.Kb); c.PackedGitMMAP = (useMMAP); c.DeltaBaseCacheLimit = (8 * WindowCacheConfig.Kb); WindowCache.reconfigure(c); }