private static void SetupBankAccounts() { CrudProxy bankAccount = new BankAccountProxy(); var bankAccountDto = new Ola.RestClient.Dto.BankAccountDto() { Type = AccountType.Asset, Name = "TestBank " + System.Guid.NewGuid().ToString(), DisplayName = "TestBank " + System.Guid.NewGuid().ToString(), BSB = "111-111", AccountNumber = "12345-6789" }; bankAccount.Insert(bankAccountDto); _bankAccount01Id = bankAccountDto.Uid; bankAccountDto = new Ola.RestClient.Dto.BankAccountDto() { Type = AccountType.Asset, Name = "TestBank " + System.Guid.NewGuid().ToString(), DisplayName = "TestBank " + System.Guid.NewGuid().ToString(), BSB = "222-222", AccountNumber = "2345-6789" }; bankAccount.Insert(bankAccountDto); _bankAccount02Id = bankAccountDto.Uid; }
private void SetupBankAccounts() { var proxySettings = (NameValueCollection)ConfigurationManager.GetSection("ola.restclient/proxySettings"); CrudProxy bankAccount = new BankAccountProxy(); this.Westpac = new BankAccountDto(); this.Westpac.Type = AccountType.Asset; this.Westpac.Name = "Westpac " + System.Guid.NewGuid().ToString(); this.Westpac.DisplayName = this.Westpac.Name; this.Westpac.BSB = "111-111"; this.Westpac.AccountNumber = "12345-6789"; this.Westpac.MerchantFeeAccountUid = int.Parse(proxySettings["MerchantFeeAccountUid"]); bankAccount.Insert(this.Westpac); this.StGeorge = new BankAccountDto(); this.StGeorge.Type = AccountType.Asset; this.StGeorge.Name = "St. George " + System.Guid.NewGuid().ToString(); this.StGeorge.DisplayName = this.StGeorge.Name; this.StGeorge.BSB = "222-222"; this.StGeorge.AccountNumber = "9897-3698"; bankAccount.Insert(this.StGeorge); }
private static void AssertEqual(BankAccountDto expected, BankAccountDto actual) { TransactionCategoryTests.AssertEqual(expected, actual, false); Assert.AreEqual(expected.DisplayName, actual.DisplayName, "Different display name."); Assert.AreEqual(expected.BSB, actual.BSB, "Different BSB."); Assert.AreEqual(expected.AccountNumber, actual.AccountNumber, "Different account number."); }
private BankAccountDto GetBankAccount() { BankAccountDto dto = new BankAccountDto(); dto.Type = AccountType.Asset; dto.Name = "CBA " + System.Guid.NewGuid().ToString(); dto.DisplayName = dto.Name + " DisplayName"; dto.LedgerCode = Guid.NewGuid().ToString().Substring(0, 5); dto.IsActive = true; dto.BSB = "111-111"; dto.AccountNumber = "12345-6789"; dto.MerchantFeeAccountUid = _merchantFeeDto.Uid; return dto; }
private void CreateTestAccounts() { if (_IncomeAccountId == 0) { var dto = new TransactionCategoryDto { Type = AccountType.Income, Name = "Income Account " + " " + System.Guid.NewGuid() }; new Ola.RestClient.Proxies.TransactionCategoryProxy().Insert(dto); _IncomeAccountId = dto.Uid; } if (_IncomeAccountId2 == 0) { var dto = new TransactionCategoryDto { Type = AccountType.Income, Name = "Income Account " + " " + System.Guid.NewGuid() }; new Ola.RestClient.Proxies.TransactionCategoryProxy().Insert(dto); _IncomeAccountId2 = dto.Uid; } if (_ExpenseAccountId == 0) { var dto = new TransactionCategoryDto { Type = AccountType.Expense, Name = "Expense Account " + " " + System.Guid.NewGuid() }; new Ola.RestClient.Proxies.TransactionCategoryProxy().Insert(dto); _ExpenseAccountId = dto.Uid; } if (_ExpenseAccountId2 == 0) { var dto = new TransactionCategoryDto { Type = AccountType.Expense, Name = "Expense Account2 " + " " + System.Guid.NewGuid() }; new Ola.RestClient.Proxies.TransactionCategoryProxy().Insert(dto); _ExpenseAccountId2 = dto.Uid; } if (_AssetAccountId == 0) { var dto = new TransactionCategoryDto { Type = AccountType.Asset, Name = "Asset Account " + " " + System.Guid.NewGuid() }; new Ola.RestClient.Proxies.TransactionCategoryProxy().Insert(dto); _AssetAccountId = dto.Uid; } if (_BankAccountId == 0) { var acctname = "Bank Account " + " " + System.Guid.NewGuid(); var dto = new BankAccountDto { BSB = "111111", AccountNumber = "22222222", Type = AccountType.Income, Name = acctname, DisplayName = acctname }; new Ola.RestClient.Proxies.BankAccountProxy().Insert(dto); _BankAccountId = dto.Uid; } }