Skip to content

Commit 3f03417

Browse files
committed
fix: use IReadOnlyCollection instead
1 parent d1940b1 commit 3f03417

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/EntityFramework.Storage/test/IntegrationTests/DbContexts/ClientDbContextTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
1+
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

55
using IdentityServer4.EntityFramework.DbContexts;
6-
using Microsoft.EntityFrameworkCore;
7-
using System.Linq;
86
using IdentityServer4.EntityFramework.Entities;
97
using IdentityServer4.EntityFramework.Options;
8+
using Microsoft.EntityFrameworkCore;
9+
using System.Linq;
1010
using Xunit;
1111

1212
namespace IdentityServer4.EntityFramework.IntegrationTests.DbContexts
@@ -15,7 +15,7 @@ public class ClientDbContextTests : IntegrationTest<ClientDbContextTests, Config
1515
{
1616
public ClientDbContextTests(DatabaseProviderFixture<ConfigurationDbContext> fixture) : base(fixture)
1717
{
18-
foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<ConfigurationDbContext>)y)).ToList())
18+
foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<ConfigurationDbContext>) y)).ToList())
1919
{
2020
using (var context = new ConfigurationDbContext(options, StoreOptions))
2121
context.Database.EnsureCreated();

src/EntityFramework.Storage/test/IntegrationTests/IntegrationTest.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
using System;
2-
using System.Linq;
3-
using System.Runtime.InteropServices;
41
using Microsoft.EntityFrameworkCore;
52
using Microsoft.Extensions.Configuration;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Runtime.InteropServices;
67
using Xunit;
78

89
namespace IdentityServer4.EntityFramework.IntegrationTests
@@ -17,7 +18,7 @@ namespace IdentityServer4.EntityFramework.IntegrationTests
1718
public class IntegrationTest<TClass, TDbContext, TStoreOption> : IClassFixture<DatabaseProviderFixture<TDbContext>>
1819
where TDbContext : DbContext
1920
{
20-
public static readonly TheoryData<DbContextOptions<TDbContext>> TestDatabaseProviders;
21+
public static readonly IReadOnlyCollection<object[]> TestDatabaseProviders;
2122
protected readonly TStoreOption StoreOptions = Activator.CreateInstance<TStoreOption>();
2223

2324
static IntegrationTest()
@@ -50,7 +51,7 @@ static IntegrationTest()
5051

5152
protected IntegrationTest(DatabaseProviderFixture<TDbContext> fixture)
5253
{
53-
fixture.Options = TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<TDbContext>)y)).ToList();
54+
fixture.Options = TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<TDbContext>) y)).ToList();
5455
fixture.StoreOptions = StoreOptions;
5556
}
5657
}

0 commit comments

Comments
 (0)