public static void ClassInit(TestContext testContext) { var connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); var options = new DbContextOptionsBuilder <CmdDbContext>() .UseSqlite(connection) .EnableSensitiveDataLogging() .Options; _context = new CmdDbContext(options); _context.Database.EnsureCreated(); _moviesController = new MoviesController(new MoviesHandler(new ActorMovieRepository(_context))); _actorsController = new ActorsController(new ActorsHandler(new ActorMovieRepository(_context))); DbHelpers.SeedDatabase(_context); }