public void BeforeEach()
        {
            _bestellingBuilder = new BestellingBuilder();

            _connection = new SqliteConnection("DataSource=:memory:");
            _connection.Open();

            var options = new DbContextOptionsBuilder <BetaalContext>()
                          .UseSqlite(_connection)
                          .EnableSensitiveDataLogging()
                          .Options;

            _nijnContext = new TestBusContextBuilder().CreateTestContext();

            _dbContext = new BetaalContext(options);
            _dbContext.Database.EnsureCreated();
            SeedDatabase();
            var bestellingDataMapper = new BestellingDataMapper(_dbContext);
            var betalingDataMapper   = new BetalingDataMapper(_dbContext);
            var eventPublisher       = new EventPublisher(_nijnContext);

            var betalingVerwerkenService = new BetalingVerwerkenService(betalingDataMapper, bestellingDataMapper, eventPublisher, new LoggerFactory());


            _target = new EventListener(bestellingDataMapper, betalingVerwerkenService);

            _dbContext.Database.EnsureCreated();
        }
Exemple #2
0
        public void BeforeEach()
        {
            _connection = new SqliteConnection("DataSource=:memory:");
            _connection.Open();

            _options = new DbContextOptionsBuilder <BetaalContext>()
                       .UseSqlite(_connection)
                       .Options;

            _betaalContext = new BetaalContext(_options);
            _betaalContext.Database.EnsureCreated();

            _bestellingBuilder = new BestellingBuilder();
            _target            = new BetalingDataMapper(_betaalContext);
        }