public void WhiteDepositAmount() { BankAppViewModel ba = new BankAppViewModel(); ba.SelectedAccount = new Account("Account 1", 1500.0, 0.013); ba.DepositAmount(500); double expected = 1500.00 + 500.00; double actual = ba.SelectedAccount.Amount; Assert.AreEqual(expected, actual); }
public void WhiteDepositZero() { BankAppViewModel ba = new BankAppViewModel(); ba.SelectedAccount = new Account("Account 1", 1500.0, 0.013); try { ba.DepositAmount(0.00); Assert.Fail("It is supposed to fail, because you cant deposit 0.00"); } catch (InvalidDepositException) { } }
public void WhiteDepositMoreThanTenThousand() { BankAppViewModel ba = new BankAppViewModel(); ba.SelectedAccount = new Account("Account 1", 1500.0, 0.013); try { ba.DepositAmount(10000.01); Assert.Fail("It is supposed to fail, because you cant deposit more than 10000.00"); } catch (InvalidDepositException) { } }