public void InitializeTest() { var builder = new DbContextOptionsBuilder <FilmsDBContext>().UseNpgsql("Server=localhost;port=5432;Database=FilmsDBTP3; uid=postgres; password=postgres;"); _context = new FilmsDBContext(builder.Options); _dataRepository = new CompteManager(_context); _controller = new CompteController(_dataRepository); }
public UnitTest1() { var builder = new DbContextOptionsBuilder <FilmsContext>() .UseSqlServer( "Server=localhost\\SQLEXPRESS; Database=Films;Trusted_Connection=True;" ); context = new FilmsContext(builder.Options); _dataRepository = new CompteManager(context); compteController = new CompteController(_dataRepository); }