public void LicenseIsValidButThenExpires() { var expiry = Instant.FromUtc(2000, 1, 1, 0, 0, 0); var clock = new StubClock(expiry - Duration.One); var license = new License(expiry, clock); Debug.WriteLine("License valid"); Assert.IsFalse(license.HasExpired); clock.AdvanceTicks(1); Assert.IsTrue(license.HasExpired); Debug.WriteLine("License expired"); }
public void AdvanceTicks() { StubClock clock = new StubClock(new Instant(100L)); clock.AdvanceTicks(3); Assert.AreEqual(103, clock.Now.Ticks); }