示例#1
0
        public void TestRemoveAccount()
        {
            Customer customer = new Customer("me", "1234");

            BankAccount[] accounts =
            {
                new BankAccount(111, BankSimulator.AccountType.Saving),
                new BankAccount(222, BankSimulator.AccountType.Current)
            };
            foreach (BankAccount a in accounts)
            {
                customer.AddAccounts(a);
            }
            Assert.AreEqual(2, customer.Accounts.Count);
            customer.RemoveAccounts(accounts[0]);
            Assert.AreEqual(1, customer.Accounts.Count);
        }