public void Setup() { var builder = new ConfigurationBuilder() .AddEnvironmentVariables(); _configuration = builder.Build(); var options = new DbContextOptionsBuilder <LorryMobileAPIContext>() .UseInMemoryDatabase(databaseName: "LorryLog") .Options; _context = new LorryMobileAPIContext(options); _controller = new PickupsController(_context); }
public PickupsController(LorryMobileAPIContext context) { _context = context; }