Пример #1
0
        public void LicenseActivation()
        {
            #region Arrange
            var licOrderId     = _irepo.GetLicenseOrderId();
            var logininfo      = _irepo.GetLicenseLoginInfo();
            var activationInfo = new ActivationInfoDTO
            {
                LicenseOrderId = licOrderId,
                MachineName    = LicenseUtils.GetMachineName(),
                MetaPath       = LicenseUtils.GetInstanceMetaPath(),
                Host           = LicenseUtils.GetHostName(),
            };
            #endregion

            //Act
            var data    = LicenseUtils.SerializeActivationInfo(activationInfo);
            var service = new LicensingService(logininfo);

            //Assert
            Assert.AreNotEqual(string.Empty, service.ActivateLicense(data));
        }