コード例 #1
0
ファイル: Account.cs プロジェクト: ManjunathP/ABCBank
        public Account(User user, AccountType type)
        {
            _user = user;
            _Id++;

            _type = type;
            _AccountId = type.ToString() + _Id.ToString();
        }
コード例 #2
0
ファイル: TestABCBank.cs プロジェクト: ManjunathP/ABCBank
        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()));
        }
コード例 #3
0
ファイル: TestABCBank.cs プロジェクト: ManjunathP/ABCBank
        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());
        }
コード例 #4
0
ファイル: CurrentAccount.cs プロジェクト: ManjunathP/ABCBank
 public CurrentAccount(User pUser, AccountType type)
     : base(pUser, type)
 {
 }
コード例 #5
0
ファイル: TestABCBank.cs プロジェクト: ManjunathP/ABCBank
 public void Init()
 {
     user = new User("sanjeev", "*****@*****.**");
 }
コード例 #6
0
ファイル: SavingsAccount.cs プロジェクト: ManjunathP/ABCBank
 public SavingsAccount(User pUser, AccountType type)
     : base(pUser, type)
 {
 }
コード例 #7
0
ファイル: Bank.cs プロジェクト: ManjunathP/ABCBank
 public static Account OpenAccount(User user, ABCBank.AccountType type)
 {
     return new Account(user, type);
 }