Skip to content

Commit 38c3c50

Browse files
Cleanup tests
1 parent 00cf8b7 commit 38c3c50

File tree

2 files changed

+736
-214
lines changed

2 files changed

+736
-214
lines changed

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/GlobalObjectIdentificationTests.cs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class GlobalObjectIdentificationTests : FusionTestBase
99
#region selections on node field
1010

1111
[Fact(Skip = "Not yet supported")]
12-
public void Id_And_Typename_Selection_On_Node_Field()
12+
public void Node_Field_Id_And_Typename_Selection()
1313
{
1414
// arrange
1515
var subgraphA = new TestSubgraph(
@@ -57,7 +57,7 @@ NOT SUPPORTED
5757
}
5858

5959
[Fact(Skip = "Not yet supported")]
60-
public void Concrete_Type_On_Node_Field_Selection_Has_Dependency()
60+
public void Node_Field_Concrete_Type_Has_Dependency()
6161
{
6262
// arrange
6363
var subgraphA = new TestSubgraph(
@@ -72,12 +72,7 @@ interface Node {
7272
7373
type Discussion implements Node @key(fields: "id") {
7474
id: ID!
75-
viewerRating: Float!
76-
product: Product
77-
}
78-
79-
type Product @key(fields: "id") {
80-
id: ID!
75+
name: String
8176
}
8277
""");
8378

@@ -91,9 +86,9 @@ interface Node {
9186
id: ID!
9287
}
9388
94-
type Product implements Node @key(fields: "id") {
89+
type Discussion implements Node @key(fields: "id") {
9590
id: ID!
96-
name: String
91+
commentCount: Int
9792
}
9893
""");
9994

@@ -107,11 +102,8 @@ type Product implements Node @key(fields: "id") {
107102
query testQuery($id: ID!) {
108103
node(id: $id) {
109104
... on Discussion {
110-
id
111-
viewerRating
112-
product {
113-
name
114-
}
105+
name
106+
commentCount
115107
}
116108
}
117109
}
@@ -126,7 +118,7 @@ NOT SUPPORTED
126118
}
127119

128120
[Fact(Skip = "Not yet supported")]
129-
public void Concrete_Type_On_Node_Field_With_Dependency()
121+
public void Node_Field_Concrete_Type_Selection_Has_Dependency()
130122
{
131123
// arrange
132124
var subgraphA = new TestSubgraph(
@@ -141,7 +133,12 @@ interface Node {
141133
142134
type Discussion implements Node @key(fields: "id") {
143135
id: ID!
144-
name: String
136+
viewerRating: Float!
137+
product: Product
138+
}
139+
140+
type Product @key(fields: "id") {
141+
id: ID!
145142
}
146143
""");
147144

@@ -155,9 +152,9 @@ interface Node {
155152
id: ID!
156153
}
157154
158-
type Discussion implements Node @key(fields: "id") {
155+
type Product implements Node @key(fields: "id") {
159156
id: ID!
160-
commentCount: Int
157+
name: String
161158
}
162159
""");
163160

@@ -171,8 +168,11 @@ type Discussion implements Node @key(fields: "id") {
171168
query testQuery($id: ID!) {
172169
node(id: $id) {
173170
... on Discussion {
174-
name
175-
commentCount
171+
id
172+
viewerRating
173+
product {
174+
name
175+
}
176176
}
177177
}
178178
}
@@ -187,7 +187,7 @@ NOT SUPPORTED
187187
}
188188

189189
[Fact(Skip = "Not yet supported")]
190-
public void Two_Concrete_Types_On_Node_Field_Selection_Has_Same_Dependency()
190+
public void Node_Field_Two_Concrete_Types_Selections_Have_Same_Dependency()
191191
{
192192
// arrange
193193
var subgraphA = new TestSubgraph(
@@ -278,7 +278,7 @@ NOT SUPPORTED
278278
}
279279

280280
[Fact(Skip = "Not yet supported")]
281-
public void Two_Concrete_Types_On_Node_Field_Selection_Has_Different_Dependency()
281+
public void Node_Field_Two_Concrete_Types_Selections_Have_Different_Dependencies()
282282
{
283283
// arrange
284284
var subgraphA = new TestSubgraph(
@@ -374,7 +374,7 @@ NOT SUPPORTED
374374
#region interface selections on node field
375375

376376
[Fact(Skip = "Not yet supported")]
377-
public void Selections_On_Interface_On_Node_Field()
377+
public void Node_Field_Selections_On_Interface()
378378
{
379379
// arrange
380380
var subgraphA = new TestSubgraph(
@@ -428,7 +428,7 @@ NOT SUPPORTED
428428
}
429429

430430
[Fact(Skip = "Not yet supported")]
431-
public void Selections_On_Interface_And_Concrete_Type_On_Node_Field()
431+
public void Node_Field_Selections_On_Interface_And_Concrete_Type()
432432
{
433433
// arrange
434434
var subgraphA = new TestSubgraph(
@@ -485,7 +485,7 @@ NOT SUPPORTED
485485
}
486486

487487
[Fact(Skip = "Not yet supported")]
488-
public void Selections_On_Interface_On_Node_Field_Interface_Selection_Has_Dependency()
488+
public void Node_FIeld_Selections_On_Interface_And_Concrete_Type_Both_Have_Different_Dependencies()
489489
{
490490
// arrange
491491
var subgraphA = new TestSubgraph(
@@ -510,6 +510,7 @@ interface ProductList {
510510
type Item2 implements Node & ProductList @key(fields: "id") {
511511
id: ID!
512512
products: [Product]
513+
singularProduct: Product
513514
}
514515
515516
type Product implements Node @key(fields: "id") {
@@ -550,6 +551,11 @@ ... on ProductList {
550551
name
551552
}
552553
}
554+
... on Item2 {
555+
singularProduct {
556+
name
557+
}
558+
}
553559
}
554560
}
555561
""");
@@ -563,7 +569,7 @@ NOT SUPPORTED
563569
}
564570

565571
[Fact(Skip = "Not yet supported")]
566-
public void Selections_On_Interface_And_Concrete_Type_On_Node_Field_Interface_Selection_Has_Dependency()
572+
public void Node_Field_Selections_On_Interface_Selection_Has_Dependency()
567573
{
568574
// arrange
569575
var subgraphA = new TestSubgraph(
@@ -588,7 +594,6 @@ interface ProductList {
588594
type Item2 implements Node & ProductList @key(fields: "id") {
589595
id: ID!
590596
products: [Product]
591-
singularProduct: Product
592597
}
593598
594599
type Product implements Node @key(fields: "id") {
@@ -629,11 +634,6 @@ ... on ProductList {
629634
name
630635
}
631636
}
632-
... on Item2 {
633-
singularProduct {
634-
name
635-
}
636-
}
637637
}
638638
}
639639
""");

0 commit comments

Comments
 (0)