public void AdvanceTicks() { FakeClock clock = new FakeClock(Instant.FromUnixTimeTicks(100L)); clock.AdvanceTicks(3); Assert.AreEqual(103, clock.GetCurrentInstant().ToUnixTimeTicks()); }
public void AdvanceTicks() { FakeClock clock = new FakeClock(Instant.FromTicksSinceUnixEpoch(100L)); clock.AdvanceTicks(3); Assert.AreEqual(103, clock.GetCurrentInstant().Ticks); }
public void AdvanceTicks() { FakeClock clock = new FakeClock(new Instant(100L)); clock.AdvanceTicks(3); Assert.AreEqual(103, clock.Now.Ticks); }
public void NonExpiredLicenseBecomesLicense() { Instant expiry = Instant.FromUtc(2000, 1, 1, 0, 0, 0); FakeClock clock = new FakeClock(expiry - Duration.OneTick); License license = new License(expiry, clock); Assert.IsFalse(license.HasExpired); clock.AdvanceTicks(1); Assert.IsTrue(license.HasExpired); }