예제 #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();
        }
예제 #2
0
        public static async Task AssemblyInit(TestContext context)
        {
            var dbContextFactory = new SampleDbContextFactory();

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

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