Skip to content

Commit bf6c5e3

Browse files
Copilotroji
andcommitted
Sync to EF 11.0.0-preview.3.26154.119
Co-authored-by: roji <1862641+roji@users.noreply.github.com>
1 parent 02b5a95 commit bf6c5e3

26 files changed

Lines changed: 164 additions & 232 deletions

test/EFCore.PG.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesNpgsqlTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Microsoft.EntityFrameworkCore.BulkUpdates;
22

33
public class NonSharedModelBulkUpdatesNpgsqlTest(NonSharedFixture fixture) : NonSharedModelBulkUpdatesRelationalTestBase(fixture)
44
{
5-
protected override ITestStoreFactory TestStoreFactory
5+
protected override ITestStoreFactory NonSharedTestStoreFactory
66
=> NpgsqlTestStoreFactory.Instance;
77

88

@@ -149,7 +149,7 @@ public override async Task Update_owned_and_non_owned_properties_with_table_shar
149149
public override async Task Update_main_table_in_entity_with_entity_splitting(bool async)
150150
{
151151
// Overridden/duplicated because we update DateTime, which Npgsql requires to be a UTC timestamp
152-
var contextFactory = await InitializeAsync<DbContext>(
152+
var contextFactory = await InitializeNonSharedTest<DbContext>(
153153
onModelCreating: mb => mb.Entity<Blog>()
154154
.ToTable("Blogs")
155155
.SplitToTable(
@@ -166,7 +166,7 @@ public override async Task Update_main_table_in_entity_with_entity_splitting(boo
166166

167167
await AssertUpdate(
168168
async,
169-
contextFactory.CreateContext,
169+
contextFactory.CreateDbContext,
170170
ss => ss.Set<Blog>(),
171171
s => s.SetProperty(b => b.CreationTimestamp, b => new DateTime(2020, 1, 1, 0, 0, 0, DateTimeKind.Utc)),
172172
rowsAffectedCount: 1);
@@ -226,7 +226,7 @@ SELECT COALESCE(sum(o0."Amount"), 0)::int
226226
[MemberData(nameof(IsAsyncData))]
227227
public virtual async Task Update_with_primitive_collection_in_value_selector(bool async)
228228
{
229-
var contextFactory = await InitializeAsync<Context3001>(
229+
var contextFactory = await InitializeNonSharedTest<Context3001>(
230230
seed: async ctx =>
231231
{
232232
ctx.AddRange(new EntityWithPrimitiveCollection { Tags = ["tag1", "tag2"] });
@@ -235,7 +235,7 @@ public virtual async Task Update_with_primitive_collection_in_value_selector(boo
235235

236236
await Assert.ThrowsAsync<InvalidOperationException>(() => AssertUpdate(
237237
async,
238-
contextFactory.CreateContext,
238+
contextFactory.CreateDbContext,
239239
ss => ss.EntitiesWithPrimitiveCollection,
240240
s => s.SetProperty(x => x.Tags, x => x.Tags.Append("another_tag")),
241241
rowsAffectedCount: 1));

test/EFCore.PG.FunctionalTests/EntitySplittingNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ namespace Microsoft.EntityFrameworkCore;
33
public class EntitySplittingNpgsqlTest(NonSharedFixture fixture, ITestOutputHelper testOutputHelper)
44
: EntitySplittingTestBase(fixture, testOutputHelper)
55
{
6-
protected override ITestStoreFactory TestStoreFactory
6+
protected override ITestStoreFactory NonSharedTestStoreFactory
77
=> NpgsqlTestStoreFactory.Instance;
88
}

test/EFCore.PG.FunctionalTests/JsonTypesNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ protected class LogSequenceNumberType
563563
public NpgsqlLogSequenceNumber LogSequenceNumber { get; set; }
564564
}
565565

566-
protected override ITestStoreFactory TestStoreFactory => NpgsqlTestStoreFactory.Instance;
566+
protected override ITestStoreFactory NonSharedTestStoreFactory => NpgsqlTestStoreFactory.Instance;
567567

568568
protected override IServiceCollection AddServices(IServiceCollection serviceCollection)
569569
=> serviceCollection.AddEntityFrameworkNpgsqlNetTopologySuite();

test/EFCore.PG.FunctionalTests/MaterializationInterceptionNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
1616
}
1717
}
1818

19-
protected override ITestStoreFactory TestStoreFactory
19+
protected override ITestStoreFactory NonSharedTestStoreFactory
2020
=> NpgsqlTestStoreFactory.Instance;
2121
}

test/EFCore.PG.FunctionalTests/Query/AdHocAdvancedMappingsQueryNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Microsoft.EntityFrameworkCore.Query;
33
public class AdHocAdvancedMappingsQueryNpgsqlTest(NonSharedFixture fixture)
44
: AdHocAdvancedMappingsQueryRelationalTestBase(fixture)
55
{
6-
protected override ITestStoreFactory TestStoreFactory
6+
protected override ITestStoreFactory NonSharedTestStoreFactory
77
=> NpgsqlTestStoreFactory.Instance;
88

99
// Cannot write DateTime with Kind=Unspecified to PostgreSQL type 'timestamp with time zone', only UTC is supported.

test/EFCore.PG.FunctionalTests/Query/AdHocComplexTypeQueryNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ LIMIT 2
1919
""");
2020
}
2121

22-
protected override ITestStoreFactory TestStoreFactory
22+
protected override ITestStoreFactory NonSharedTestStoreFactory
2323
=> NpgsqlTestStoreFactory.Instance;
2424
}

test/EFCore.PG.FunctionalTests/Query/AdHocJsonQueryNpgsqlTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.EntityFrameworkCore.Query;
88

99
public class AdHocJsonQueryNpgsqlTest(NonSharedFixture fixture) : AdHocJsonQueryRelationalTestBase(fixture)
1010
{
11-
protected override ITestStoreFactory TestStoreFactory
11+
protected override ITestStoreFactory NonSharedTestStoreFactory
1212
=> NpgsqlTestStoreFactory.Instance;
1313

1414
protected override async Task Seed29219(DbContext ctx)
@@ -179,7 +179,7 @@ protected override Task SeedBadJsonProperties(ContextBadJsonProperties ctx)
179179
[ConditionalTheory, MemberData(nameof(IsAsyncData))]
180180
public virtual async Task Json_predicate_on_bytea(bool async)
181181
{
182-
var contextFactory = await InitializeAsync<TypesDbContext>(
182+
var contextFactory = await InitializeNonSharedTest<TypesDbContext>(
183183
seed: async context =>
184184
{
185185
context.Entities.AddRange(
@@ -188,7 +188,7 @@ public virtual async Task Json_predicate_on_bytea(bool async)
188188
await context.SaveChangesAsync();
189189
});
190190

191-
using (var context = contextFactory.CreateContext())
191+
using (var context = contextFactory.CreateDbContext())
192192
{
193193
var query = context.Entities.Where(x => x.JsonEntity.Bytea == new byte[] { 1, 2, 4 });
194194

@@ -211,7 +211,7 @@ LIMIT 2
211211
[ConditionalTheory, MemberData(nameof(IsAsyncData))]
212212
public virtual async Task Json_predicate_on_interval(bool async)
213213
{
214-
var contextFactory = await InitializeAsync<TypesDbContext>(
214+
var contextFactory = await InitializeNonSharedTest<TypesDbContext>(
215215
seed: async context =>
216216
{
217217
context.Entities.AddRange(
@@ -220,7 +220,7 @@ public virtual async Task Json_predicate_on_interval(bool async)
220220
await context.SaveChangesAsync();
221221
});
222222

223-
using (var context = contextFactory.CreateContext())
223+
using (var context = contextFactory.CreateDbContext())
224224
{
225225
var query = context.Entities.Where(x => x.JsonEntity.Interval == new TimeSpan(2, 2, 3, 4, 123, 456));
226226

test/EFCore.PG.FunctionalTests/Query/AdHocManyToManyQueryNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace Microsoft.EntityFrameworkCore.Query;
22

33
public class AdHocManyToManyQueryNpgsqlTest(NonSharedFixture fixture) : AdHocManyToManyQueryRelationalTestBase(fixture)
44
{
5-
protected override ITestStoreFactory TestStoreFactory
5+
protected override ITestStoreFactory NonSharedTestStoreFactory
66
=> NpgsqlTestStoreFactory.Instance;
77
}

test/EFCore.PG.FunctionalTests/Query/AdHocMiscellaneousQueryNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Microsoft.EntityFrameworkCore.Query;
44

55
public class AdHocMiscellaneousQueryNpgsqlTest(NonSharedFixture fixture) : AdHocMiscellaneousQueryRelationalTestBase(fixture)
66
{
7-
protected override ITestStoreFactory TestStoreFactory
7+
protected override ITestStoreFactory NonSharedTestStoreFactory
88
=> NpgsqlTestStoreFactory.Instance;
99

1010
protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, ParameterTranslationMode parameterizedCollectionMode)

test/EFCore.PG.FunctionalTests/Query/AdHocNavigationsQueryNpgsqlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ public class AdHocNavigationsQueryNpgsqlTest(NonSharedFixture fixture) : AdHocNa
66
public override Task Reference_include_on_derived_type_with_sibling_works()
77
=> Assert.ThrowsAsync<DbUpdateException>(() => base.Reference_include_on_derived_type_with_sibling_works());
88

9-
protected override ITestStoreFactory TestStoreFactory
9+
protected override ITestStoreFactory NonSharedTestStoreFactory
1010
=> NpgsqlTestStoreFactory.Instance;
1111
}

0 commit comments

Comments
 (0)