public async Task Setup() { var dbContextFactory = new SampleDbContextFactory(); DbContext = dbContextFactory.CreateDbContext(new string[] { }); CoreUnitOfWork = new EfCoreUnitOfWork(DbContext); var firstBankService = new FirstBankService(); BankRoutingService = new BankRoutingService(firstBankService); FeeService = new FeeService(); var inMemorySettings = new Dictionary <string, string> { { "MaxDeposit", "1000000" }, { "MaxWithdraw", "100000" }, { "DaysAfterWalletCreationWithNoFee", "7" }, { "IsFirstTransferFreeInMonth", "True" }, { "FixedFee", "100" }, { "FeeLimit", "10000" }, { "PercentageFee", "1" } }; Configuration = new ConfigurationBuilder() .AddInMemoryCollection(inMemorySettings) .Build(); }
public async Task Setup() { var dbContextFactory = new DbContextFactory(); DbContext = dbContextFactory.CreateDbContext(new string[] { }); CoreUnitOfWork = new CoreEfCoreUnitOfWork(DbContext); var brankoBankService = new BrankoBankService(); BankRoutingService = new BankRoutingService(brankoBankService); FeeService = new FeeService(); var inMemorySettings = new Dictionary <string, string> { { "MaximalDeposit", "750000" }, { "MaximalWithdraw", "500000" }, { "NumberOfDaysAfterCreationWithNoFee", "0" }, { "FirstTransactionFreeEachMonth", "True" }, { "FixedFeeLimit", "10000" }, { "FixedFee", "100" }, { "PercentageFee", "1" }, { "AdminPassword", "123456" } }; Configuration = new ConfigurationBuilder() .AddInMemoryCollection(inMemorySettings) .Build(); }
public WalletService( ICoreUnitOfWork coreUnitOfWork, IBankRoutingService bankRoutingService, IConfiguration configuration, IFeeService feeService ) { CoreUnitOfWork = coreUnitOfWork; BankRoutingService = bankRoutingService; Configuration = configuration; FeeService = feeService; }
public WalletService( ICoreUnitOfWork coreUnitOfWork, IBankRoutingService bankRoutingService, IFeeService feeService, IConfiguration configuration) { CoreUnitOfWork = coreUnitOfWork; BankRoutingService = bankRoutingService; FeeService = feeService; MaxDeposit = decimal.Parse(configuration["MaxDeposit"]); MaxWithdraw = decimal.Parse(configuration["MaxWithdraw"]); DaysAfterWalletCreationWithNoFee = Int32.Parse(configuration["DaysAfterWalletCreationWithNoFee"]); IsFirstTransferFreeInMonth = bool.Parse(configuration["IsFirstTransferFreeInMonth"]); FixedFee = decimal.Parse(configuration["FixedFee"]); PercentageFee = Int32.Parse(configuration["PercentageFee"]); FeeLimit = decimal.Parse(configuration["FeeLimit"]); AdminPASS = configuration["AdminPASS"]; }
public async Task Setup() { var dbContextFactory = new DbContextFactory(); DbContext = dbContextFactory.CreateDbContext(new string[] { }); CoreUnitOfWork = new CoreEfCoreUnitOfWork(DbContext); var brankoBankService = new BrankoBankService(); BankRoutingService = new BankRoutingService(brankoBankService); FeeService = new FeeService(); var inMemorySettings = new Dictionary <string, string> { { "MaximalDeposit", "2000000" }, { "MaximalWithdraw", "2000000" }, }; Configuration = new ConfigurationBuilder() .AddInMemoryCollection(inMemorySettings) .Build(); }