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 BetalingController(betalingVerwerkenService); _dbContext.Database.EnsureCreated(); }
public void BeforeEach() { _betalingVerwerkenServiceMock = new Mock <IBetalingVerwerkenService>(MockBehavior.Strict); _target = new BetalingController(_betalingVerwerkenServiceMock.Object); }
public void BeforeEach() { _commandPublisherMock = new Mock <ICommandPublisher>(MockBehavior.Strict); _target = new BetalingController(_commandPublisherMock.Object, new LoggerFactory()); }