Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public static async Task AssemblyInit(TestContext context)
        {
            var dbContextFactory = new SampleDbContextFactory();

            using (var dbContext = dbContextFactory.CreateDbContext(new string[] { }))
            {
                await dbContext.Database.EnsureCreatedAsync();
            }
        }
Ejemplo n.º 3
0
        public static async Task AssemblyCleanup()
        {
            var dbContextFactory = new SampleDbContextFactory();

            using (var dbContext = dbContextFactory.CreateDbContext(new string[] { }))
            {
                await dbContext.Database.EnsureDeletedAsync();
            }
        }