예제 #1
0
        public void ConvertNullAPIToAPI()
        {
            apiLicense = null;
            converter  = new LicenseConverter(apiLicense);

            Assert.IsNull(converter.ToAPILicense());
        }
예제 #2
0
        public void ConvertNullSDKToAPI()
        {
            sdkLicense = null;
            converter  = new LicenseConverter(sdkLicense);

            Assert.IsNull(converter.ToAPILicense());
        }
예제 #3
0
        public void ConvertSDKToSDK()
        {
            sdkLicense = CreateTypicalSDKLicense();
            converter  = new LicenseConverter(sdkLicense);
            License license = converter.ToSDKLicense();

            Assert.IsNotNull(license);
            Assert.AreEqual(sdkLicense, license);
        }
예제 #4
0
        public void ConvertAPIToAPI()
        {
            apiLicense = CreateTypicalAPILicense();
            converter  = new LicenseConverter(apiLicense);

            OneSpanSign.API.License license = converter.ToAPILicense();

            Assert.IsNotNull(license);
            Assert.AreEqual(apiLicense, license);
        }
예제 #5
0
        public void ConvertAPIToSDK()
        {
            apiLicense = CreateTypicalAPILicense();
            converter  = new LicenseConverter(apiLicense);
            License license = converter.ToSDKLicense();

            Assert.IsNotNull(license);
            Assert.AreEqual(LIC_STATUS, license.Status);
            Assert.AreEqual(1, license.Transactions.Count);
            Assert.AreEqual(LIC_TRANS_CC_NUM, license.Transactions[0].CreditCard.Number);
            Assert.AreEqual(LIC_TRANS_PRICE_AMOUNT, license.Transactions[0].Price.Amount);
            Assert.AreEqual(LIC_PLAN_CONTRACT, license.Plan.Contract);
            Assert.AreEqual(LIC_PLAN_PRICE_AMOUNT, license.Plan.Price.Amount);
        }