private void SetUp() { var services = new ServiceCollection(); services.AddDbContext <PcPartPickerDbContext>(options => options.UseInMemoryDatabase(Guid.NewGuid().ToString())); services.AddScoped <ISystemBuildService, SystemBuildService>(); services.AddScoped <IUnitOfWork, UnitOfWork>(); services.AddScoped <IRepository <SystemBuild>, Repository <SystemBuild> >(); IServiceProvider provider = services.BuildServiceProvider(); _context = provider.GetService <PcPartPickerDbContext>(); _systemBuildService = provider.GetService <ISystemBuildService>(); _testSystemBuilds = GetSystemBuilds(); }
public SystemBuildsController(ISystemBuildService service, IGoogleDriveService driveService) { _service = service; _driveService = driveService; }