public async Task NewAccountWasCreatedForCurrency(Currency currency) { var account = PrePaidAccount.New(currency); await _repository.Save(account); _id = account.Id; }
public async Task AmountAvailableWas(decimal value, Currency currency) { var account = PrePaidAccount.New(currency); account.Recharge(Money.Of(value, currency)); await _repository.Save(account); _id = account.Id; }
public void AccountIsRecharged(decimal value, Currency currency) { _account = PrePaidAccount.Restore( new PrePaidAccount.Snapshot(_id, _amountAvailable, _debtLimit, _debt)); _account.Recharge(Money.Of(value, currency)); }
public void NewAccountIsCreated(Currency currency) => _account = PrePaidAccount.New(currency);