コード例 #1
0
 public static BankAccount CreateBankAccountWithBalance(Balance balance)
 {
     return(new BankAccount(Guid.NewGuid(), balance));
 }
コード例 #2
0
 private BankAccount(Guid id, Balance balance) : base(id)
 {
     Causes(new AccountCreatedWithBalance(balance));
 }
コード例 #3
0
 private void When(DepositedMoney depositedMoney)
 {
     Balance = Balance.Deposit(depositedMoney.Amount);
 }
コード例 #4
0
 private void When(AccountCreatedWithBalance accountCreatedWithBalance)
 {
     Balance = accountCreatedWithBalance.Balance;
 }
コード例 #5
0
 private void When(WithdrawnMoney withdrawnMoney)
 {
     Balance = Balance.Withdraw(withdrawnMoney.Amount);
 }