Exemple #1
0
        public void Transfer(decimal amount, Account toAccount)
        {
            if (this.Balance <= amount)
            {
                this.Error = "insufficient funds";
                return;
            }

            this.Book(-amount, "Transfer to " + toAccount.Name);
            toAccount.Book(amount, "Transfer from " + this.Name);
        }
 public void GivenIHaveAnAccountOfSupersaverWithABalanceOf(Decimal p0)
 {
     _supersaverAccount = new Account("supersaver");
     _supersaverAccount.Book(p0, "Supersaver Balance");
 }
 public void GivenIHaveAnAccountOfSavingsWithABalanceOf(Decimal p0)
 {
     _savingsAccount = new Account("savings");
     _savingsAccount.Book(p0, "Savings Balance");
 }
 public void GivenIHaveAnAccountOfCurrentWithABalanceOf(Decimal p0)
 {
     _currentAccount = new Account("current");
     _currentAccount.Book(p0, "Current Balance");
 }
 public void GivenMySavingsAccountHasABalanceOf(Decimal p0)
 {
     _savingsAccount = new Account("savings");
     _savingsAccount.Book(p0, "Savings Balance");
 }
 public void GivenMyCurrentAccountHasABalanceOf(Decimal p0)
 {
     _currentAccount = new Account("current");
     _currentAccount.Book(p0, "Current Balance");
 }