public void Setup() { var fixture = new Fixture(); _depositCommand = fixture.Build <DepositCommand>() .FromFactory(() => new DepositCommand(1, CurrencySettings.DefaultCurrencyKey)) .Create(); _depositCommandWithZeroMoney = fixture.Build <DepositCommand>() .FromFactory(() => new DepositCommand(0, CurrencySettings.DefaultCurrencyKey)) .Create(); _currencies = fixture.Build <Currency>() //.FromFactory(() => new Currency("PHP", 1,"en-PH")) .CreateMany(5); _wallets = fixture.Build <Wallet>() .CreateMany(1); _target = new DepositCommandHandler(_walletRepositoryMock.Object, _currencyRepositoryMock.Object, _authenticationServiceMock.Object); }
public CommandResult CreateDeposit(CreateDepositCommand command) { var handler = new DepositCommandHandler(); return(handler.Handle(command)); }
public void Setup() { context = BankingContext.Create(); handler = new DepositCommandHandler(currencyService, context, dateTime); _accountRepository = new AccountRepository(context, dateTime); }