Пример #1
0
        public void ConvertNullAPIToAPI()
        {
            apiCreditCard = null;
            converter     = new CreditCardConverter(apiCreditCard);

            Assert.IsNull(converter.ToAPICreditCard());
        }
Пример #2
0
        public void ConvertNullSDKToAPI()
        {
            sdkCreditCard = null;
            converter     = new CreditCardConverter(sdkCreditCard);

            Assert.IsNull(converter.ToAPICreditCard());
        }
Пример #3
0
        public void ConvertAPIToAPI()
        {
            apiCreditCard = CreateTypicalAPICreditCard();
            converter     = new CreditCardConverter(apiCreditCard);

            OneSpanSign.API.CreditCard creditCard = converter.ToAPICreditCard();

            Assert.IsNotNull(creditCard);
            Assert.AreEqual(apiCreditCard, creditCard);
        }
Пример #4
0
        public void ConvertSDKToAPI()
        {
            sdkCreditCard = CreateTypicalSDKCreditCard();
            converter     = new CreditCardConverter(sdkCreditCard);

            OneSpanSign.API.CreditCard creditCard = converter.ToAPICreditCard();

            Assert.IsNotNull(creditCard);
            Assert.AreEqual(CC_CVV, creditCard.Cvv);
            Assert.AreEqual(CC_EXP_YEAR, creditCard.Expiration.Year);
        }