public void Initialize_Amount() { var money = new Money(123); var withdrawnMoney = new WithdrawnMoney(money); var actual = withdrawnMoney.Amount; Assert.AreEqual(money, actual); }
private DateTimeOffset[] GetOccurredOns() { var accountCreatedWithBalance = new AccountCreatedWithBalance(Balance.Create(123m)); var accountCreatedWithEmptyBalance = new AccountCreatedWithEmptyBalance(); var depositedMoney = new DepositedMoney(new Money(123m)); var withdrawnMoney = new WithdrawnMoney(new Money(123m)); return(new[] { accountCreatedWithBalance.OccurredOn, accountCreatedWithEmptyBalance.OccurredOn, depositedMoney.OccurredOn, withdrawnMoney.OccurredOn }); }
private void When(WithdrawnMoney moneyWithdrawn) { this.balance = this.balance.Subtract(moneyWithdrawn.Amount); }
private void When(WithdrawnMoney withdrawnMoney) { Balance = Balance.Withdraw(withdrawnMoney.Amount); }