Esempio n. 1
0
            public async Task NewAccountWasCreatedForCurrency(Currency currency)
            {
                var account = PrePaidAccount.New(currency);
                await _repository.Save(account);

                _id = account.Id;
            }
Esempio n. 2
0
            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;
            }
Esempio n. 3
0
 public void AccountIsRecharged(decimal value, Currency currency)
 {
     _account = PrePaidAccount.Restore(
         new PrePaidAccount.Snapshot(_id, _amountAvailable, _debtLimit, _debt));
     _account.Recharge(Money.Of(value, currency));
 }
Esempio n. 4
0
 public void NewAccountIsCreated(Currency currency) => _account = PrePaidAccount.New(currency);