Ejemplo n.º 1
0
        public void DebitMoreThanThousandIndividualTest()
        {
            Customer owner = new Customer();

            owner.CustomerName      = "John Smith";
            owner.CustomerAccountId = 1231;

            IndividualInvestmentAccount individualAccount = new IndividualInvestmentAccount(2000, owner);

            individualAccount.Debit(10000);
        }
Ejemplo n.º 2
0
        public void DebitTest()
        {
            Customer owner = new Customer();

            owner.CustomerName      = "John Smith";
            owner.CustomerAccountId = 1231;

            IndividualInvestmentAccount individualAccount = new IndividualInvestmentAccount(10000, owner);

            individualAccount.Debit(1000);
            Assert.AreEqual(9000, individualAccount.Balance);

            CorporateInvestmentAccount CorpAccount = new CorporateInvestmentAccount(10000, owner);

            CorpAccount.Debit(5545.55M);
            Assert.AreEqual(4454.45M, CorpAccount.Balance);

            CheckingAccount checkingAccount = new CheckingAccount(2500, owner);

            checkingAccount.Debit(1200);
            Assert.AreEqual(1300, checkingAccount.Balance);
        }