コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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();
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
 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();
             }
         }
     }
 }