Skip to content

Commit 41bc463

Browse files
committed
Remove SQL seeding in complex JSON tests
Now that the update pipeline works, dotnet#36379
1 parent 4be400a commit 41bc463

File tree

3 files changed

+0
-194
lines changed

3 files changed

+0
-194
lines changed

test/EFCore.Relational.Specification.Tests/Query/Relationships/ComplexJson/ComplexJsonRelationalFixtureBase.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ public abstract class ComplexJsonRelationalFixtureBase : ComplexPropertiesFixtur
99
{
1010
protected override string StoreName => "ComplexJsonQueryTest";
1111

12-
// TODO: Temporary, until we have update pipeline support for complex JSON
13-
protected override Task SeedAsync(PoolableDbContext context)
14-
=> throw new NotImplementedException("Must be implemented in derived provider implementations using SQL, since the update pipeline does not yet support complex JSON.");
15-
1612
protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context)
1713
{
1814
base.OnModelCreating(modelBuilder, context);

test/EFCore.SqlServer.FunctionalTests/Query/Relationships/ComplexJson/ComplexJsonSqlServerFixture.cs

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -7,99 +7,4 @@ public class ComplexJsonSqlServerFixture : ComplexJsonRelationalFixtureBase
77
{
88
protected override ITestStoreFactory TestStoreFactory
99
=> SqlServerTestStoreFactory.Instance;
10-
11-
protected override async Task SeedAsync(PoolableDbContext context)
12-
{
13-
// TODO: Temporary, until we have update pipeline support for complex JSON
14-
await context.Database.ExecuteSqlAsync($$$"""
15-
INSERT INTO RootEntity (Id, Name, RequiredRelated, OptionalRelated, RelatedCollection) VALUES
16-
(
17-
1,
18-
'Root1',
19-
-- RequiredRelated:
20-
'{
21-
"Id": 100,
22-
"Name": "Root1_RequiredRelated",
23-
"Int": 8,
24-
"String": "foo",
25-
"RequiredNested": { "Id": 1000, "Name": "Root1_RequiredRelated_RequiredNested", "Int": 50, "String": "foo_foo" },
26-
"OptionalNested": { "Id": 1001, "Name": "Root1_RequiredRelated_OptionalNested", "Int": 51, "String": "foo_bar" },
27-
"NestedCollection":
28-
[
29-
{ "Id": 1002, "Name": "Root1_RequiredRelated_NestedCollection_1", "Int": 52, "String": "foo_baz1" },
30-
{ "Id": 1003, "Name": "Root1_RequiredRelated_NestedCollection_2", "Int": 53, "String": "foo_baz2" }
31-
]
32-
}',
33-
-- OptionalRelated:
34-
'{
35-
"Id": 101,
36-
"Name": "Root1_OptionalRelated",
37-
"Int": 9,
38-
"String": "bar",
39-
"RequiredNested": { "Id": 1010, "Name": "Root1_OptionalRelated_RequiredNested", "Int": 52, "String": "bar_foo" },
40-
"OptionalNested": { "Id": 1011, "Name": "Root1_OptionalRelated_OptionalNested", "Int": 53, "String": "bar_bar" },
41-
"NestedCollection":
42-
[
43-
{ "Id": 1012, "Name": "Root1_OptionalRelated_NestedCollection_1", "Int": 54, "String": "bar_baz1" },
44-
{ "Id": 1013, "Name": "Root1_OptionalRelated_NestedCollection_2", "Int": 55, "String": "bar_baz2" }
45-
]
46-
}',
47-
-- RelatedCollection:
48-
'[
49-
{
50-
"Id": 102,
51-
"Name": "Root1_RelatedCollection_1",
52-
"Int": 21,
53-
"String": "foo",
54-
"RequiredNested": { "Id": 1020, "Name": "Root1_RelatedCollection_1_RequiredNested", "Int": 50, "String": "foo_foo" },
55-
"OptionalNested": { "Id": 1021, "Name": "Root1_RelatedCollection_1_OptionalNested", "Int": 51, "String": "foo_bar" },
56-
"NestedCollection":
57-
[
58-
{ "Id": 1022, "Name": "Root1_RelatedCollection_1_NestedCollection_1", "Int": 53, "String": "foo_bar" },
59-
{ "Id": 1023, "Name": "Root1_RelatedCollection_1_NestedCollection_2", "Int": 51, "String": "foo_bar" }
60-
]
61-
},
62-
{
63-
"Id": 103,
64-
"Name": "Root1_RelatedCollection_2",
65-
"Int": 22,
66-
"String": "foo",
67-
"RequiredNested": { "Id": 1030, "Name": "Root1_RelatedCollection_2_RequiredNested", "Int": 50, "String": "foo_foo" },
68-
"OptionalNested": { "Id": 1031, "Name": "Root1_RelatedCollection_2_OptionalNested", "Int": 51, "String": "foo_bar" },
69-
"NestedCollection":
70-
[
71-
{ "Id": 1032, "Name": "Root1_RelatedCollection_2_NestedCollection_1", "Int": 53, "String": "foo_bar" },
72-
{ "Id": 1033, "Name": "Root1_RelatedCollection_2_NestedCollection_2", "Int": 51, "String": "foo_bar" }
73-
]
74-
}
75-
]'
76-
),
77-
(
78-
2,
79-
'Root2',
80-
-- RequiredRelated:
81-
'{
82-
"Id": 200,
83-
"Name": "Root2_RequiredRelated",
84-
"Int": 10,
85-
"String": "aaa",
86-
"RequiredNested": { "Id": 2000, "Name": "Root2_RequiredRelated_RequiredNested", "Int": 54, "String": "aaa_xxx" },
87-
"OptionalNested": { "Id": 2001, "Name": "Root2_RequiredRelated_OptionalNested", "Int": 55, "String": "aaa_yyy" },
88-
"NestedCollection": []
89-
}',
90-
-- OptionalRelated:
91-
'{
92-
"Id": 201,
93-
"Name": "Root2_OptionalRelated",
94-
"Int": 11,
95-
"String": "bbb",
96-
"RequiredNested": { "Id": 2010, "Name": "Root2_OptionalRelated_RequiredNested", "Int": 56, "String": "bbb_xxx" },
97-
"OptionalNested": { "Id": 2011, "Name": "Root2_OptionalRelated_OptionalNested", "Int": 57, "String": "bbb_yyy" },
98-
"NestedCollection": []
99-
}',
100-
-- RelatedCollection:
101-
'[]'
102-
)
103-
""");
104-
}
10510
}

test/EFCore.Sqlite.FunctionalTests/Query/Relationships/ComplexJson/ComplexJsonSqliteFixture.cs

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -7,99 +7,4 @@ public class ComplexJsonSqliteFixture : ComplexJsonRelationalFixtureBase
77
{
88
protected override ITestStoreFactory TestStoreFactory
99
=> SqliteTestStoreFactory.Instance;
10-
11-
protected override async Task SeedAsync(PoolableDbContext context)
12-
{
13-
// TODO: Temporary, until we have update pipeline support for complex JSON
14-
await context.Database.ExecuteSqlAsync($$$"""
15-
INSERT INTO RootEntity (Id, Name, RequiredRelated, OptionalRelated, RelatedCollection) VALUES
16-
(
17-
1,
18-
'Root1',
19-
-- RequiredRelated:
20-
'{
21-
"Id": 100,
22-
"Name": "Root1_RequiredRelated",
23-
"Int": 8,
24-
"String": "foo",
25-
"RequiredNested": { "Id": 1000, "Name": "Root1_RequiredRelated_RequiredNested", "Int": 50, "String": "foo_foo" },
26-
"OptionalNested": { "Id": 1001, "Name": "Root1_RequiredRelated_OptionalNested", "Int": 51, "String": "foo_bar" },
27-
"NestedCollection":
28-
[
29-
{ "Id": 1002, "Name": "Root1_RequiredRelated_NestedCollection_1", "Int": 52, "String": "foo_baz1" },
30-
{ "Id": 1003, "Name": "Root1_RequiredRelated_NestedCollection_2", "Int": 53, "String": "foo_baz2" }
31-
]
32-
}',
33-
-- OptionalRelated:
34-
'{
35-
"Id": 101,
36-
"Name": "Root1_OptionalRelated",
37-
"Int": 9,
38-
"String": "bar",
39-
"RequiredNested": { "Id": 1010, "Name": "Root1_OptionalRelated_RequiredNested", "Int": 52, "String": "bar_foo" },
40-
"OptionalNested": { "Id": 1011, "Name": "Root1_OptionalRelated_OptionalNested", "Int": 53, "String": "bar_bar" },
41-
"NestedCollection":
42-
[
43-
{ "Id": 1012, "Name": "Root1_OptionalRelated_NestedCollection_1", "Int": 54, "String": "bar_baz1" },
44-
{ "Id": 1013, "Name": "Root1_OptionalRelated_NestedCollection_2", "Int": 55, "String": "bar_baz2" }
45-
]
46-
}',
47-
-- RelatedCollection:
48-
'[
49-
{
50-
"Id": 102,
51-
"Name": "Root1_RelatedCollection_1",
52-
"Int": 21,
53-
"String": "foo",
54-
"RequiredNested": { "Id": 1020, "Name": "Root1_RelatedCollection_1_RequiredNested", "Int": 50, "String": "foo_foo" },
55-
"OptionalNested": { "Id": 1021, "Name": "Root1_RelatedCollection_1_OptionalNested", "Int": 51, "String": "foo_bar" },
56-
"NestedCollection":
57-
[
58-
{ "Id": 1022, "Name": "Root1_RelatedCollection_1_NestedCollection_1", "Int": 53, "String": "foo_bar" },
59-
{ "Id": 1023, "Name": "Root1_RelatedCollection_1_NestedCollection_2", "Int": 51, "String": "foo_bar" }
60-
]
61-
},
62-
{
63-
"Id": 103,
64-
"Name": "Root1_RelatedCollection_2",
65-
"Int": 22,
66-
"String": "foo",
67-
"RequiredNested": { "Id": 1030, "Name": "Root1_RelatedCollection_2_RequiredNested", "Int": 50, "String": "foo_foo" },
68-
"OptionalNested": { "Id": 1031, "Name": "Root1_RelatedCollection_2_OptionalNested", "Int": 51, "String": "foo_bar" },
69-
"NestedCollection":
70-
[
71-
{ "Id": 1032, "Name": "Root1_RelatedCollection_2_NestedCollection_1", "Int": 53, "String": "foo_bar" },
72-
{ "Id": 1033, "Name": "Root1_RelatedCollection_2_NestedCollection_2", "Int": 51, "String": "foo_bar" }
73-
]
74-
}
75-
]'
76-
),
77-
(
78-
2,
79-
'Root2',
80-
-- RequiredRelated:
81-
'{
82-
"Id": 200,
83-
"Name": "Root2_RequiredRelated",
84-
"Int": 10,
85-
"String": "aaa",
86-
"RequiredNested": { "Id": 2000, "Name": "Root2_RequiredRelated_RequiredNested", "Int": 54, "String": "aaa_xxx" },
87-
"OptionalNested": { "Id": 2001, "Name": "Root2_RequiredRelated_OptionalNested", "Int": 55, "String": "aaa_yyy" },
88-
"NestedCollection": []
89-
}',
90-
-- OptionalRelated:
91-
'{
92-
"Id": 201,
93-
"Name": "Root2_OptionalRelated",
94-
"Int": 11,
95-
"String": "bbb",
96-
"RequiredNested": { "Id": 2010, "Name": "Root2_OptionalRelated_RequiredNested", "Int": 56, "String": "bbb_xxx" },
97-
"OptionalNested": { "Id": 2011, "Name": "Root2_OptionalRelated_OptionalNested", "Int": 57, "String": "bbb_yyy" },
98-
"NestedCollection": []
99-
}',
100-
-- RelatedCollection:
101-
'[]'
102-
)
103-
""");
104-
}
10510
}

0 commit comments

Comments
 (0)