예제 #1
0
        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);
        }
예제 #3
0
        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();
        }
예제 #4
0
 public AuthorSeeder(BlinkContext blinkContext)
 {
     _blinkContext = blinkContext;
 }
 public BookRepository(BlinkContext blinkContext)
 {
     _blinkContext = blinkContext ??
                     throw new ArgumentNullException(nameof(blinkContext));
 }