Exemple #1
0
        public void NonExpiredLicense()
        {
            var    expiry  = Instant.FromUtc(2000, 1, 1, 0, 0, 0);
            IClock clock   = new StubClock(expiry - Duration.FromTicks(1));
            var    license = new License(expiry, clock);

            Assert.IsFalse(license.HasExpired);
        }
Exemple #2
0
        public void ExpiredLicense()
        {
            // arrange
            var    expiry = Instant.FromUtc(2000, 1, 1, 0, 0, 0);
            IClock clock  = new StubClock(expiry + Duration.FromTicks(1));
            // act
            License license = new License(expiry, clock);

            //assert
            Assert.IsTrue(license.HasExpired);
        }