示例#1
0
        public void GetLicenseHoldTime_NullString_ReturnsDefault()
        {
            // Arrange
            int licenseHoldTimeDefault = 1234;

            // Act
            var result = LicenceHelper.GetLicenseHoldTime(null, licenseHoldTimeDefault);

            // Assert
            Assert.AreEqual(licenseHoldTimeDefault, result);
        }
示例#2
0
        public void GetLicenseHoldTime_EncryptedString_ReturnsDecryptedValue()
        {
            // Arrange
            string encryptedLicenceHoldTimerString = "z1CEEZ3i9Yj4RcIXSmbWfA==";
            int    licenseHoldTimeDefault          = 1234;

            // Act
            var result = LicenceHelper.GetLicenseHoldTime(encryptedLicenceHoldTimerString, licenseHoldTimeDefault);

            // Assert
            Assert.AreEqual(0, result);
        }
示例#3
0
        public void GetLicenseHoldTime_NonBase64String_ReturnsDefault()
        {
            // Arrange
            string encryptedLicenceHoldTimerString = "\0";
            int    licenseHoldTimeDefault          = 1234;

            // Act
            var result = LicenceHelper.GetLicenseHoldTime(encryptedLicenceHoldTimerString, licenseHoldTimeDefault);

            // Assert
            Assert.AreEqual(licenseHoldTimeDefault, result);
        }