Esempio n. 1
0
        public void AdvanceTicks()
        {
            FakeClock clock = new FakeClock(Instant.FromUnixTimeTicks(100L));

            clock.AdvanceTicks(3);
            Assert.AreEqual(103, clock.GetCurrentInstant().ToUnixTimeTicks());
        }
Esempio n. 2
0
        public void AdvanceTicks()
        {
            FakeClock clock = new FakeClock(Instant.FromTicksSinceUnixEpoch(100L));

            clock.AdvanceTicks(3);
            Assert.AreEqual(103, clock.GetCurrentInstant().Ticks);
        }
Esempio n. 3
0
        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);
        }