public CompanyControllerIntegrationTests() { var optionsBuilder = new DbContextOptionsBuilder <CompanyContext>(); string connectionString = "server=localhost;database=companydb_test;user=root;password=1234"; optionsBuilder.UseMySQL(connectionString); optionsBuilder.EnableSensitiveDataLogging(); CompanyContext context = new CompanyContext(optionsBuilder.Options); SeedRepository seedRepository = new SeedRepository(context); CompanyRepository companyRepository = new CompanyRepository(context); CompanyController = new CompanyController(companyRepository, seedRepository); context.Database.Migrate(); CompanyController.ClearData(); }