Esempio n. 1
0
        public void Get_default_token_expiry_time_if_no_setting_is_available()
        {
            // Arrange
            var settings          = new CmiSettings();
            var defaultExpiryTime = 10;
            var helper            = new FileDownloadHelper(settings);

            // Act
            var result = helper.GetConfigValueTokenValidTime();

            // Assert
            result.Should().Be(defaultExpiryTime);
        }
Esempio n. 2
0
        public void Get_correct_configured_token_expiry_time()
        {
            // Arrange
            var settings = new CmiSettings {
                ["tokenValidTime"] = "123"
            };
            var helper = new FileDownloadHelper(settings);

            // Act
            var result = helper.GetConfigValueTokenValidTime();

            // Assert
            result.Should().Be(123);
        }