public Account(User user, AccountType type) { _user = user; _Id++; _type = type; _AccountId = type.ToString() + _Id.ToString(); }
public void TestShouldBeAbleToOpenAccountForAUser() { User user = new User("manjunath", "*****@*****.**"); Account account = Bank.OpenAccount(user, AccountType.Current); Assert.AreSame(user, account.getUser()); Assert.IsNotNull(account.getId()); Assert.IsTrue(account.getId().StartsWith(AccountType.Current.ToString())); }
public void TestToCheckIftwoAccountsGenerateDifferentAccountNumber() { User user = new User("sanjeev", "*****@*****.**"); Account savingsAccount = Bank.OpenAccount(user, AccountType.Savings); User user1 = new User("manjunath", "*****@*****.**"); Account savingsAccount1 = Bank.OpenAccount(user1, AccountType.Savings); Assert.AreNotEqual<string>(savingsAccount.getId(), savingsAccount1.getId()); }
public CurrentAccount(User pUser, AccountType type) : base(pUser, type) { }
public void Init() { user = new User("sanjeev", "*****@*****.**"); }
public SavingsAccount(User pUser, AccountType type) : base(pUser, type) { }
public static Account OpenAccount(User user, ABCBank.AccountType type) { return new Account(user, type); }