public DatabaseTestBase() { _connection = new SqliteConnection("Filename=:memory:"); _connection.Open(); _db = new HobbyListDbContext( new DbContextOptionsBuilder <HobbyListDbContext>() .UseSqlite(_connection) .Options); _db.Database.EnsureCreated(); _paint = new PaintService(_db); _supply = new SupplyService(_db); _miniModel = new MiniModelService(_db, _paint, _supply); }
/// <summary> /// below makes the minimodel controller public so other files can reference it /// </summary> /// <param name="miniModel">this is the variable representing the Iminimodel interface</param> public MiniModelsController(IMiniModel miniModel) { _miniModel = miniModel; }