@@ -181,6 +181,44 @@ public async Task Can_AutoPage_Issue_Comments()
181
181
182
182
[ IntegrationTest ]
183
183
public async Task Can_AutoPage_Issues_Comments ( )
184
+ {
185
+ var query = new Query ( )
186
+ . Repository ( owner : "octokit" , name : "octokit.net" )
187
+ . Issues ( ) . AllPages ( 50 )
188
+ . Select ( issue => new
189
+ {
190
+ issue . Id ,
191
+ Comments = issue . Comments ( null , null , null , null ) . AllPages ( 10 ) . Select ( comment => comment . Body ) . ToList ( ) ,
192
+ } ) ;
193
+
194
+ var result = ( await Connection . Run ( query ) ) . ToList ( ) ;
195
+
196
+ Assert . Contains ( result , x => x . Comments . Count > 20 ) ;
197
+ }
198
+
199
+ [ IntegrationTest ]
200
+ public async Task Can_AutoPage_Issues_Comments_With_Subquery ( )
201
+ {
202
+ var query = new Query ( )
203
+ . Repository ( owner : "octokit" , name : "octokit.net" )
204
+ . Issues ( ) . AllPages ( 50 )
205
+ . Select ( issue => new
206
+ {
207
+ issue . Id ,
208
+ Comments = issue . Comments ( null , null , null , null ) . AllPages ( 10 ) . Select ( comment => new
209
+ {
210
+ comment . Body ,
211
+ Reactions = comment . Reactions ( null , null , null , null , null , null ) . AllPages ( ) . Select ( r => r . Id ) . ToList ( )
212
+ } ) . ToList ( ) ,
213
+ } ) ;
214
+
215
+ var result = ( await Connection . Run ( query ) ) . ToList ( ) ;
216
+
217
+ Assert . Contains ( result , x => x . Comments . Count > 20 ) ;
218
+ }
219
+
220
+ [ IntegrationTest ]
221
+ public async Task Can_AutoPage_Issues_With_Subquery ( )
184
222
{
185
223
var query = new Query ( )
186
224
. Repository ( owner : "octokit" , name : "octokit.net" )
@@ -194,7 +232,6 @@ public async Task Can_AutoPage_Issues_Comments()
194
232
var result = ( await Connection . Run ( query ) ) . ToList ( ) ;
195
233
196
234
Assert . True ( result . Count > 100 ) ;
197
- Assert . Contains ( result , x => x . Comments . Count > 100 ) ;
198
235
}
199
236
200
237
class ActorModel
0 commit comments