public void TestPaymentStringFromAccount() { Debug.WriteLine("paymentStringFromAccount"); SmartPaymentParameters parameters = new SmartPaymentParameters(); parameters.BankAccount = new CzechBankAccount("19", "123", "0800"); SmartPaymentMap extendedParameters = null; bool transliterateParams = false; string expResult = "SPD*1.0*ACC:CZ2408000000190000000123"; string result = SmartPayment.PaymentStringFromAccount(parameters, extendedParameters, transliterateParams); Assert.AreEqual(expResult, result); }
public void TestPaymentStringFromAccountAmountAndAlternateAccounts() { Debug.WriteLine("paymentStringFromAccount"); SmartPaymentParameters parameters = new SmartPaymentParameters(); parameters.BankAccount = new CzechBankAccount("19", "123", "0800"); List <BankAccount> alternateAccounts = new List <BankAccount>(); alternateAccounts.Add(new CzechBankAccount(null, "19", "5500")); alternateAccounts.Add(new CzechBankAccount(null, "19", "0100")); parameters.AlternateAccounts = alternateAccounts; parameters.Amount = 100.5m; SmartPaymentMap extendedParameters = null; bool transliterateParams = false; string expResult = "SPD*1.0*ACC:CZ2408000000190000000123*ALT-ACC:CZ9755000000000000000019,CZ7301000000000000000019*AM:100.5"; string result = SmartPayment.PaymentStringFromAccount(parameters, extendedParameters, transliterateParams); Debug.WriteLine(result); Assert.AreEqual(expResult, result); }