ResetCache() public method

public ResetCache ( ) : void
return void
Ejemplo n.º 1
0
 public void Should_expire_after_One_second()
 {
     var log = MockRepository.GenerateMock<ILog>();
     var t = new TimeSpan(0, 0, 0, 0, 500);
     var cache = new Cache(t, log);
     cache.ResetCache();
     Assert.That(cache.HasExpired(), Is.EqualTo(false));
     Thread.Sleep(1000);
     Assert.That(cache.HasExpired(), Is.EqualTo(true));
 }