Example #1
0
 public void TestWithdraw()
 {
     BankAccount account = new BankAccount();
     account.Deposit(125.0);
     account.Withdraw(25.0);
     account.Withdraw(50.0);//make a change
     Assert.AreEqual(50.0, account.Balance);
 }
Example #2
0
 public void ExcessiveWithdrawal_ThrowsOneApplicationException()
 {
     var account = new BankAccount();
     account.Deposit(25.0);
     Assert.Throws<ApplicationException>(() => account.Withdraw(30.0));
     Assert.AreEqual(0, 0);
 }