protected BaseIntegrationTest() { var appFactory = new WebApplicationFactory <Startup>() .WithWebHostBuilder(ConfigureWebHost); DbContext = appFactory.Services.CreateScope().ServiceProvider.GetService <BlinkContext>(); TestClient = appFactory.CreateClient(); }
public AuthorRepositoryTest() { var options = new DbContextOptionsBuilder <BlinkContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options; _dbContext = new BlinkContext(options); _authorRepository = new AuthorRepository(_dbContext); }
public MainPage() { this.colorOn = new SolidColorBrush(); this.colorOn.Color = Colors.Green; this.colorOff = new SolidColorBrush(); this.colorOff.Color = Colors.Red; this.colorIdle = new SolidColorBrush(); this.colorIdle.Color = Colors.White; InitializeComponent(); this.context = new BlinkContext(this); this.context.EnterInitialState(); }
public AuthorSeeder(BlinkContext blinkContext) { _blinkContext = blinkContext; }
public BookRepository(BlinkContext blinkContext) { _blinkContext = blinkContext ?? throw new ArgumentNullException(nameof(blinkContext)); }