Ejemplo n.º 1
0
        private void DeleteAccount()
        {
            Account ac = new Account();

            ac.AccountName = "Savings";
            da.DeleteAccount(ac);
        }
Ejemplo n.º 2
0
        public void TestUpdateAccount()
        {
            da = new CDataAccess(fileName);
            Assert.IsNotNull(da);
            da.ReadAllAccounts();

            AddAccount();
            Assert.That(da.Accounts.Count == 3);
            Assert.That(da.Accounts[0].AccountName == "CreditCard");
            Assert.That(da.Accounts[1].AccountName == "Current");
            Assert.That(da.Accounts[2].AccountName == "Savings");

            Account ac = new Account();

            ac.AccountName = "ISA";

            da.UpdateAccount(da.Accounts[2], ac);

            da.ReadAllAccounts();
            Assert.That(da.Accounts.Count == 3);
            Assert.That(da.Accounts[0].AccountName == "CreditCard");
            Assert.That(da.Accounts[1].AccountName == "Current");
            Assert.That(da.Accounts[2].AccountName == "ISA");

            da.DeleteAccount(ac);
        }