コード例 #1
0
        public void GetStatus_WhenExpirationDateHasPassed_StatusIsExpired()
        {
            // Arrange
            var expirationDate     = DateTime.MinValue;
            var featureInformation = new FeatureInformation(_workflowFeatureName, expirationDate);
            // Act
            var status = featureInformation.GetStatus();

            // Assert
            Assert.AreEqual(FeatureLicenseStatus.Expired, status);
        }
コード例 #2
0
        public void GetStatus_WhenExpirationDateIsUpcoming_StatusIsActive()
        {
            // Arrange
            var expirationDate     = DateTime.MaxValue;
            var featureInformation = new FeatureInformation(_workflowFeatureName, expirationDate);
            // Act
            var status = featureInformation.GetStatus();

            // Assert
            Assert.AreEqual(FeatureLicenseStatus.Active, status);
        }
コード例 #3
0
        public void GetStatus_WhenExpirationDateIsEqual_StatusIsActive()
        {
            // Arrange
            var expirationDate = new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc);

            _timeProviderMock.Setup(i => i.CurrentUniversalTime).Returns(expirationDate);
            var featureInformation = new FeatureInformation(_workflowFeatureName, expirationDate, _timeProviderMock.Object);
            // Act
            var status = featureInformation.GetStatus();

            // Assert
            Assert.AreEqual(FeatureLicenseStatus.Active, status);
        }