示例#1
0
        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);
        }
示例#2
0
        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)
            {
            }
        }
示例#3
0
        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)
            {
            }
        }