public void Create_DataWithCaptureDay_CaptureDayIsSet() { var result = PaymentResponse.Create("captureDay=42"); Assert.IsNotNull(result); Assert.AreEqual(42, result.CaptureDay); }
public void Create_DataWithOrderId_OrderIdIsSet() { var result = PaymentResponse.Create("orderId=Order"); Assert.IsNotNull(result); Assert.AreEqual("Order", result.OrderId); }
public void Create_DataWithPaymentMeanBrandSetToACCEPTGIRO_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=ACCEPTGIRO"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.ACCEPTGIRO, result.PaymentBrand); }
public void Create_DataWithMaskedPan_MaskedPanIsSet() { var result = PaymentResponse.Create("maskedPan=m*sk*d"); Assert.IsNotNull(result); Assert.AreEqual("m*sk*d", result.MaskedPan); }
public void Create_DataWithMerchantId_MerchantIdIsSet() { var result = PaymentResponse.Create("merchantId=Merchant"); Assert.IsNotNull(result); Assert.AreEqual("Merchant", result.MerchantId); }
public void Create_DataWithPaymentMeanBrandSetToVPAY_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=VPAY"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.VPAY, result.PaymentBrand); }
public void Create_DataWithPaymentMeanBrandSetToEmptyString_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=;responseCode=60"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.Unknown, result.PaymentBrand); }
public void Create_DataWithCurrencyCodeSetToPoundSterling_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=826"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.PoundSterling, result.CurrencyCode); }
public void Create_DataWithCurrencyCodeSetToSwissFranc_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=756"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.SwissFranc, result.CurrencyCode); }
public void Create_DataWithCurrencyCodeSetToJapaneseYen_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=392"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.JapaneseYen, result.CurrencyCode); }
public void Create_DataWithCurrencyCodeSetToNorwegianCrown_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=578"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.NorwegianCrown, result.CurrencyCode); }
public void Create_DataWithCurrencyCodeSetToEuro_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=978"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.Euro, result.CurrencyCode); }
public void Create_DataWithCurrencyCodeSetToCanadianDollar_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=124"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.CanadianDollar, result.CurrencyCode); }
public void Create_DataWithCaptureMode_CaptureModeIsSet() { var result = PaymentResponse.Create("captureMode=Mode"); Assert.IsNotNull(result); Assert.AreEqual("Mode", result.CaptureMode); }
public void Create_DataWithPaymentMeanBrandSetToREMBOURS_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=REMBOURS"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.REMBOURS, result.PaymentBrand); }
public void Create_DataWithCurrencyCodeSetToUnknownValue_CurrencyCodeIsSet() { var result = PaymentResponse.Create("currencyCode=42"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.Unknown, result.CurrencyCode); }
public void Create_DataWithPaymentMeanBrandToSetVISA_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=VISA"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.VISA, result.PaymentBrand); }
public void Create_DataWithKeyVersion_KeyVersionIsSet() { var result = PaymentResponse.Create("keyVersion=2"); Assert.IsNotNull(result); Assert.AreEqual(2, result.KeyVersion); }
public void Create_DataWithPaymentMeanBrandSetToUnknownValue_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=FOO"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.Unknown, result.PaymentBrand); }
public void Create_DataWithPaymentMeanBrandSetToMASTERCARD_PaymentBrandIsSet() { var result = PaymentResponse.Create("paymentMeanBrand=MASTERCARD"); Assert.IsNotNull(result); Assert.AreEqual(PaymentBrand.MASTERCARD, result.PaymentBrand); }
public void Create_DataWithAuthorisationId_AuthorisationIdIsSet() { var result = PaymentResponse.Create("authorisationId=Authorisation"); Assert.IsNotNull(result); Assert.AreEqual("Authorisation", result.AuthorisationId); }
public void Create_DataWithAmount_AmountIsSet() { var result = PaymentResponse.Create("amount=542"); Assert.IsNotNull(result); Assert.AreEqual(5.42m, result.Amount); }
public void Create_DataWithTransactionReference_TransactionReferenceIsSet() { var result = PaymentResponse.Create("transactionReference=Transaction"); Assert.IsNotNull(result); Assert.AreEqual("Transaction", result.TransactionReference); }
public void Create_DataWithAmountInYen_AmountIsNotDevided() { var result = PaymentResponse.Create("currencyCode=392|amount=542"); Assert.IsNotNull(result); Assert.AreEqual(CurrencyCode.JapaneseYen, result.CurrencyCode); Assert.AreEqual(542m, result.Amount); }
public void Create_DataWithTransactionDateTime_TransactionDateTimeIsSet() { var result = PaymentResponse.Create("transactionDateTime=2010-05-10T14:12:45Z"); Assert.IsNotNull(result); Assert.AreEqual(new DateTime(2010, 05, 10, 14, 12, 45), result.TransactionDateTime); Assert.AreEqual(DateTimeKind.Utc, result.TransactionDateTime.Value.Kind); }
public void Create_DataWithResponseCodeSetToUnknownValue_ResponseCodeIsSet() { var result = PaymentResponse.Create("responseCode=FOO"); Assert.IsNotNull(result); Assert.AreEqual(ResponseCode.Unknown, result.Code); Assert.AreEqual(ResponseStatus.Unknown, result.Status); }
public void Create_DataWithResponseCodeSetToSuccessful_CodeAndStatusAreSet() { var result = PaymentResponse.Create("responseCode=00"); Assert.IsNotNull(result); Assert.AreEqual(ResponseCode.Successful, result.Code); Assert.AreEqual(ResponseStatus.Successful, result.Status); }
public void Create_DataWithResponseCodeSetToRefused_89_CodeAndStatusAreSet() { var result = PaymentResponse.Create("responseCode=89"); Assert.IsNotNull(result); Assert.AreEqual(ResponseCode.Refused_89, result.Code); Assert.AreEqual(ResponseStatus.Refused, result.Status); }
public void Create_DataWithResponseCodeSetToExpired_CodeAndStatusAreSet() { var result = PaymentResponse.Create("responseCode=97"); Assert.IsNotNull(result); Assert.AreEqual(ResponseCode.Expired, result.Code); Assert.AreEqual(ResponseStatus.Expired, result.Status); }
public void Create_DataWithResponseCodeSetToCancelled_90_CodeAndStatusAreSet() { var result = PaymentResponse.Create("responseCode=90"); Assert.IsNotNull(result); Assert.AreEqual(ResponseCode.Cancelled_90, result.Code); Assert.AreEqual(ResponseStatus.Cancelled, result.Status); }