コード例 #1
0
ファイル: Account.cs プロジェクト: chavp/BDD-SpecFlow
        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);
        }
コード例 #2
0
 public void GivenIHaveAnAccountOfSupersaverWithABalanceOf(Decimal p0)
 {
     _supersaverAccount = new Account("supersaver");
     _supersaverAccount.Book(p0, "Supersaver Balance");
 }
コード例 #3
0
 public void GivenIHaveAnAccountOfSavingsWithABalanceOf(Decimal p0)
 {
     _savingsAccount = new Account("savings");
     _savingsAccount.Book(p0, "Savings Balance");
 }
コード例 #4
0
 public void GivenIHaveAnAccountOfCurrentWithABalanceOf(Decimal p0)
 {
     _currentAccount = new Account("current");
     _currentAccount.Book(p0, "Current Balance");
 }
コード例 #5
0
 public void GivenMySavingsAccountHasABalanceOf(Decimal p0)
 {
     _savingsAccount = new Account("savings");
     _savingsAccount.Book(p0, "Savings Balance");
 }
コード例 #6
0
 public void GivenMyCurrentAccountHasABalanceOf(Decimal p0)
 {
     _currentAccount = new Account("current");
     _currentAccount.Book(p0, "Current Balance");
 }