public void SavingsAccountTest_InterestEarned_Less_Than_A_Thousand() { IAccount savingsAccount = new SavingsAccount(); savingsAccount.Deposit(450.75m); savingsAccount.Deposit(120.50m); savingsAccount.Withdraw(4.60m); Assert.AreEqual(.56665m, savingsAccount.InterestEarned()); }
public void SavingAccountTest_SumTransactions() { IAccount savingsAccount = new SavingsAccount(); savingsAccount.Deposit(450.75m); savingsAccount.Deposit(120.32m); savingsAccount.Withdraw(4.67m); Assert.AreEqual(566.40m, savingsAccount.SumTransactions()); }
public void TestApp() { CheckingAccount checkingAccount = new CheckingAccount(); SavingsAccount savingsAccount = new SavingsAccount(); Customer henry = new Customer("Henry").OpenAccount(checkingAccount).OpenAccount(savingsAccount); checkingAccount.Deposit(100.0m); savingsAccount.Deposit(4000.0m); savingsAccount.Withdraw(200.0m); var actual = henry.GetStatement(); var expected = "Statement for HENRY" + Environment.NewLine + Environment.NewLine + "Checking Account" + Environment.NewLine + " deposit $100.00" + Environment.NewLine + "Total $100.00" + Environment.NewLine + Environment.NewLine + "Savings Account" + Environment.NewLine + " deposit $4,000.00" + Environment.NewLine + " withdrawal $200.00" + Environment.NewLine + "Total $3,800.00" + Environment.NewLine + Environment.NewLine + "Total In All Accounts: $3,900.00"; Assert.AreEqual(expected, actual); }
public void SavingsAccountTest_InterestEarned_More_Than_A_Thousand() { IAccount savingsAccount = new SavingsAccount(); savingsAccount.Deposit(1200); var actual = savingsAccount.InterestEarned(); Assert.AreEqual(1.4m, actual); }
public void SavingsAccount() { Bank bank = new Bank(); SavingsAccount savingsAccount = new SavingsAccount(); bank.AddCustomer(new Customer("Bill").OpenAccount(savingsAccount)); savingsAccount.Deposit(1500.0m); Assert.AreEqual(2.0m, bank.totalInterestPaid()); }
public void Savings_account() { Bank bank = new Bank(); IAccount checkingAccount = new SavingsAccount();//Account(Account.SAVINGS); bank.AddCustomer(new Customer("Bill").OpenAccount(checkingAccount)); checkingAccount.Deposit(1500.0); Assert.AreEqual(2.0, bank.totalInterestPaid(), DOUBLE_DELTA); }
public void TestApp() { IAccount checkingAccount = new CheckingAccount(); //Account(Account.CHECKING); IAccount savingsAccount = new SavingsAccount();//Account(Account.SAVINGS); Customer henry = new Customer("Henry").OpenAccount(checkingAccount).OpenAccount(savingsAccount); checkingAccount.Deposit(100.0); savingsAccount.Deposit(4000.0); savingsAccount.Withdraw(200.0); Assert.AreEqual("Statement for Henry\n" + "\n" + "Checking Account\n" + " deposit $100.00\n" + "Total $100.00\n" + "\n" + "Savings Account\n" + " deposit $4,000.00\n" + " withdrawal $200.00\n" + "Total $3,800.00\n" + "\n" + "Total In All Accounts $3,900.00", henry.GetStatement()); }