public CorsPolicyServiceTests(DatabaseProviderFixture <ConfigurationDbContext> fixture) : base(fixture) { foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions <ConfigurationDbContext>)y)).ToList()) { using (var context = new ConfigurationDbContext(options, StoreOptions)) context.Database.EnsureCreated(); } }
public ClientStoreTests(DatabaseProviderFixture <ConfigurationDbContext> fixture) : base(fixture) { foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions <ConfigurationDbContext>)y)).ToList()) { using (var context = new ConfigurationDbContext(options.ConnectionString, StoreOptions)) context.Database.CreateIfNotExists(); } }
public PersistedGrantStoreTests(DatabaseProviderFixture <PersistedGrantDbContext> fixture) : base(fixture) { foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions <PersistedGrantDbContext>)y)).ToList()) { using (var context = new PersistedGrantDbContext(options, StoreOptions)) context.Database.EnsureCreated(); } }
public ClientDbContextTests(DatabaseProviderFixture<ConfigurationDbContext> fixture) : base(fixture) { foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<ConfigurationDbContext>)y)).ToList()) { using (var conn = DbProviderFactories.GetFactory(options.Provider).CreateConnection()) { conn.ConnectionString = options.ConnectionString; using (var context = new ConfigurationDbContext(conn, StoreOptions)) { context.Database.CreateIfNotExists(); } } } }