Пример #1
0
        public void Account_failed_withdrawal_with_fail_fee()
        {
            //arrange
            Account a = new Investment(1000, (decimal).10, 10);

            //act
            try
            {
                a.Withdraw(1500);
            }
            catch (Exception e)
            {
                // should throw exception, and reduce balance by fail fee
                string exc = e.Message;
            }

            //assert
            decimal expected = 990;
            decimal actual   = a.Balance;

            Assert.AreEqual(expected, actual);
        }