/// <summary> /// Creates new account containing 0 money /// </summary> public void CreateNewAccount() { Accounts.Add(new Account { BankAccountNumber = AccountUtils.CreateAccountNumber(Constants.BankId, getLastAccountIndex().Result + 1), Amount = 0 }); }
public void CreateAccountNumberTest() { Assert.IsTrue(AccountUtils.ValidateAccountNumber( AccountUtils.CreateAccountNumber("00109562", 15))); Assert.IsTrue(AccountUtils.ValidateAccountNumber( AccountUtils.CreateAccountNumber("00109562", 1))); Assert.IsTrue(AccountUtils.ValidateAccountNumber( AccountUtils.CreateAccountNumber("00109562", 150000))); Assert.IsTrue(AccountUtils.ValidateAccountNumber( AccountUtils.CreateAccountNumber("00109562", 00150000))); Assert.IsTrue(AccountUtils.ValidateAccountNumber("02001095620000000000000001")); }