Пример #1
0
        public void the_balance_should_increase_correctly_when_there_is_an_existing_balance()
        {
            var account = new Account();

            account.Deposit(10);
            account.Deposit(100);

            Assert.AreEqual(110, account.Balance);
        }
Пример #2
0
 public void Init()
 {
     source = new Account();
     source.Deposit(200.00F);
     destination = new Account();
     destination.Deposit(150.00F);
 }
Пример #3
0
        public void the_balance_should_increase_correctly()
        {
            var account = new Account();

            account.Deposit(100);

            Assert.AreEqual(100, account.Balance);
        }
Пример #4
0
 public void TransferFunds(Account destination, float amount)
 {
     destination.Deposit(amount);
     if ((balance - amount) < minimumBalance)
     {
         throw new InsufficientFundsException();
     }
     Withdraw(amount);
 }
Пример #5
0
        public void TransferFunds()
        {
            Account source = new Account();
            source.Deposit(200.00F);
            Account destination = new Account();
            destination.Deposit(150.00F);

            source.TransferFunds(destination, 100.00F);
            Assert.AreEqual(250.00F, destination.Balance);
            Assert.AreEqual(100.00F, source.Balance);
        }
Пример #6
0
 public virtual void TransferFunds(Account destination, float amount)
 {
     destination.Deposit(amount);
     Withdraw(amount);
 }
Пример #7
0
 public static void deposit(Account account, int amount)
 {
     account.Deposit(amount);
 }
Пример #8
0
 public void TransferFunds(Account destination, float amount)
 {
     if (IsValidAmountAndBalance(amount)) return;
     destination.Deposit(amount);
     Withdraw(amount);
 }
Пример #9
0
        public void the_balance_of_the_source_account_should_not_change()
        {
            var source = new Account();
            source.Deposit(200.00F);
            var destination = new Account();
            destination.Deposit(150.00F);

            source.TransferFunds(destination, 201.00F);
            Assert.AreEqual(200.00F, source.Balance);
        }
Пример #10
0
        public void the_Amount_should_be_withdrawn_from_the_source_account()
        {
            var source = new Account();
            source.Deposit(200.00F);
            var destination = new Account();
            destination.Deposit(150.00F);

            source.TransferFunds(destination, 100.00F);
            Assert.AreEqual(100.00F, source.Balance);
        }
Пример #11
0
        public void the_Amount_should_be_deposited_into_the_destination_account()
        {
            var source = new Account();
            source.Deposit(200.00F);
            var destination = new Account();
            destination.Deposit(150.00F);

            source.TransferFunds(destination, 100.00F);
            Assert.AreEqual(250.00F, destination.Balance);
        }
Пример #12
0
        public void the_amount_and_the_balance_should_be_valid()
        {
            var source = new Account();
            source.Deposit(200.00F);
            var destination = new Account();
            destination.Deposit(150.00F);

            Assert.IsTrue(source.IsValidAmountAndBalance(201.00F));
        }
Пример #13
0
 public void DepositFunds()
 {
     Account source = new Account();
     source.Deposit(200.00F);
     Assert.AreEqual(200.00F, source.Balance);
 }