public void Deposit(decimal amountToDeposit)
        {
            if (amountToDeposit < 0)
            {
                throw new ImproperTransactionException();
            }
            // Ravi agreed that if we give him our balance and the amount, he'll us a bonus.
            decimal bonus = _bonusCalculator.GetDepositBonusFor(_balance, amountToDeposit);

            _balance += amountToDeposit + bonus;
            _feds.NotifyOfDeposit(amountToDeposit);
        }
コード例 #2
0
        public void Deposit(decimal amountToDeposit)
        {
            if (amountToDeposit < 0)
            {
                throw new ImproperTransactionException();
            }

            decimal bonus = _bonusCalculator.GetDepositBonusFor(_balance, amountToDeposit);

            _balance += amountToDeposit + bonus;
            _feds.NotifyOfDeposit(amountToDeposit);
        }