public static BankAccount CreateBankAccountWithBalance(Balance balance) { return(new BankAccount(Guid.NewGuid(), balance)); }
private BankAccount(Guid id, Balance balance) : base(id) { Causes(new AccountCreatedWithBalance(balance)); }
private void When(DepositedMoney depositedMoney) { Balance = Balance.Deposit(depositedMoney.Amount); }
private void When(AccountCreatedWithBalance accountCreatedWithBalance) { Balance = accountCreatedWithBalance.Balance; }
private void When(WithdrawnMoney withdrawnMoney) { Balance = Balance.Withdraw(withdrawnMoney.Amount); }