Beispiel #1
0
        public Account(User user, AccountType type)
        {
            _user = user;
            _Id++;

            _type = type;
            _AccountId = type.ToString() + _Id.ToString();
        }
Beispiel #2
0
        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()));
        }
Beispiel #3
0
        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());
        }
Beispiel #4
0
 public CurrentAccount(User pUser, AccountType type)
     : base(pUser, type)
 {
 }
Beispiel #5
0
 public void Init()
 {
     user = new User("sanjeev", "*****@*****.**");
 }
Beispiel #6
0
 public SavingsAccount(User pUser, AccountType type)
     : base(pUser, type)
 {
 }
Beispiel #7
0
 public static Account OpenAccount(User user, ABCBank.AccountType type)
 {
     return new Account(user, type);
 }