@@ -168,7 +168,7 @@ public async Task Can_use_multiple_operations()
168
168
// Assert
169
169
httpResponse . ShouldHaveStatusCode ( HttpStatusCode . OK ) ;
170
170
171
- responseDocument . Results . ShouldHaveCount ( 7 ) ;
171
+ responseDocument . Results . Should ( ) . HaveCount ( 7 ) ;
172
172
173
173
responseDocument . Results [ 0 ] . Data . SingleValue . ShouldNotBeNull ( ) . With ( resource => resource . Type . Should ( ) . Be ( "people" ) ) ;
174
174
responseDocument . Results [ 1 ] . Data . SingleValue . ShouldNotBeNull ( ) . With ( resource => resource . Type . Should ( ) . Be ( "people" ) ) ;
@@ -206,11 +206,11 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
206
206
todoItemInDatabase . Owner . ShouldNotBeNull ( ) ;
207
207
todoItemInDatabase . Owner . Id . Should ( ) . Be ( newOwnerId ) ;
208
208
todoItemInDatabase . Assignee . Should ( ) . BeNull ( ) ;
209
- todoItemInDatabase . Tags . ShouldHaveCount ( 1 ) ;
209
+ todoItemInDatabase . Tags . Should ( ) . HaveCount ( 1 ) ;
210
210
todoItemInDatabase . Tags . ElementAt ( 0 ) . Id . Should ( ) . Be ( newTagId ) ;
211
211
} ) ;
212
212
213
- store . SqlCommands . ShouldHaveCount ( 15 ) ;
213
+ store . SqlCommands . Should ( ) . HaveCount ( 15 ) ;
214
214
215
215
store . SqlCommands [ 0 ] . With ( command =>
216
216
{
@@ -220,7 +220,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
220
220
RETURNING "Id"
221
221
""" ) ) ;
222
222
223
- command . Parameters . ShouldHaveCount ( 3 ) ;
223
+ command . Parameters . Should ( ) . HaveCount ( 3 ) ;
224
224
command . Parameters . Should ( ) . Contain ( "@p1" , newOwner . FirstName ) ;
225
225
command . Parameters . Should ( ) . Contain ( "@p2" , newOwner . LastName ) ;
226
226
command . Parameters . Should ( ) . Contain ( "@p3" , null ) ;
@@ -234,7 +234,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
234
234
WHERE t1."Id" = @p1
235
235
""" ) ) ;
236
236
237
- command . Parameters . ShouldHaveCount ( 1 ) ;
237
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
238
238
command . Parameters . Should ( ) . Contain ( "@p1" , newOwnerId ) ;
239
239
} ) ;
240
240
@@ -246,7 +246,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
246
246
RETURNING "Id"
247
247
""" ) ) ;
248
248
249
- command . Parameters . ShouldHaveCount ( 3 ) ;
249
+ command . Parameters . Should ( ) . HaveCount ( 3 ) ;
250
250
command . Parameters . Should ( ) . Contain ( "@p1" , newAssignee . FirstName ) ;
251
251
command . Parameters . Should ( ) . Contain ( "@p2" , newAssignee . LastName ) ;
252
252
command . Parameters . Should ( ) . Contain ( "@p3" , null ) ;
@@ -260,7 +260,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
260
260
WHERE t1."Id" = @p1
261
261
""" ) ) ;
262
262
263
- command . Parameters . ShouldHaveCount ( 1 ) ;
263
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
264
264
command . Parameters . Should ( ) . Contain ( "@p1" , newAssigneeId ) ;
265
265
} ) ;
266
266
@@ -272,7 +272,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
272
272
RETURNING "Id"
273
273
""" ) ) ;
274
274
275
- command . Parameters . ShouldHaveCount ( 2 ) ;
275
+ command . Parameters . Should ( ) . HaveCount ( 2 ) ;
276
276
command . Parameters . Should ( ) . Contain ( "@p1" , newTag . Name ) ;
277
277
command . Parameters . Should ( ) . Contain ( "@p2" , null ) ;
278
278
} ) ;
@@ -285,7 +285,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
285
285
WHERE t1."Id" = @p1
286
286
""" ) ) ;
287
287
288
- command . Parameters . ShouldHaveCount ( 1 ) ;
288
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
289
289
command . Parameters . Should ( ) . Contain ( "@p1" , newTagId ) ;
290
290
} ) ;
291
291
@@ -297,7 +297,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
297
297
RETURNING "Id"
298
298
""" ) ) ;
299
299
300
- command . Parameters . ShouldHaveCount ( 7 ) ;
300
+ command . Parameters . Should ( ) . HaveCount ( 7 ) ;
301
301
command . Parameters . Should ( ) . Contain ( "@p1" , newTodoItem . Description ) ;
302
302
command . Parameters . Should ( ) . Contain ( "@p2" , newTodoItem . Priority ) ;
303
303
command . Parameters . Should ( ) . Contain ( "@p3" , newTodoItem . DurationInHours ) ;
@@ -315,7 +315,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
315
315
WHERE t1."Id" = @p1
316
316
""" ) ) ;
317
317
318
- command . Parameters . ShouldHaveCount ( 1 ) ;
318
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
319
319
command . Parameters . Should ( ) . Contain ( "@p1" , newTodoItemId ) ;
320
320
} ) ;
321
321
@@ -328,7 +328,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
328
328
WHERE t1."Id" = @p1
329
329
""" ) ) ;
330
330
331
- command . Parameters . ShouldHaveCount ( 1 ) ;
331
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
332
332
command . Parameters . Should ( ) . Contain ( "@p1" , newTodoItemId ) ;
333
333
} ) ;
334
334
@@ -340,7 +340,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
340
340
WHERE "Id" = @p2
341
341
""" ) ) ;
342
342
343
- command . Parameters . ShouldHaveCount ( 2 ) ;
343
+ command . Parameters . Should ( ) . HaveCount ( 2 ) ;
344
344
command . Parameters . Should ( ) . Contain ( "@p1" , newAssigneeId ) ;
345
345
command . Parameters . Should ( ) . Contain ( "@p2" , newTodoItemId ) ;
346
346
} ) ;
@@ -354,7 +354,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
354
354
WHERE t1."Id" = @p1
355
355
""" ) ) ;
356
356
357
- command . Parameters . ShouldHaveCount ( 1 ) ;
357
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
358
358
command . Parameters . Should ( ) . Contain ( "@p1" , newTodoItemId ) ;
359
359
} ) ;
360
360
@@ -366,7 +366,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
366
366
WHERE "Id" = @p2
367
367
""" ) ) ;
368
368
369
- command . Parameters . ShouldHaveCount ( 2 ) ;
369
+ command . Parameters . Should ( ) . HaveCount ( 2 ) ;
370
370
command . Parameters . Should ( ) . Contain ( "@p1" , DapperTestContext . FrozenTime ) ;
371
371
command . Parameters . Should ( ) . Contain ( "@p2" , newTodoItemId ) ;
372
372
} ) ;
@@ -379,7 +379,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
379
379
WHERE "Id" = @p2
380
380
""" ) ) ;
381
381
382
- command . Parameters . ShouldHaveCount ( 2 ) ;
382
+ command . Parameters . Should ( ) . HaveCount ( 2 ) ;
383
383
command . Parameters . Should ( ) . Contain ( "@p1" , newTodoItemId ) ;
384
384
command . Parameters . Should ( ) . Contain ( "@p2" , newTagId ) ;
385
385
} ) ;
@@ -392,7 +392,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
392
392
WHERE t1."Id" = @p1
393
393
""" ) ) ;
394
394
395
- command . Parameters . ShouldHaveCount ( 1 ) ;
395
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
396
396
command . Parameters . Should ( ) . Contain ( "@p1" , newTodoItemId ) ;
397
397
} ) ;
398
398
@@ -403,7 +403,7 @@ DELETE FROM "People"
403
403
WHERE "Id" = @p1
404
404
""" ) ) ;
405
405
406
- command . Parameters . ShouldHaveCount ( 1 ) ;
406
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
407
407
command . Parameters . Should ( ) . Contain ( "@p1" , newAssigneeId ) ;
408
408
} ) ;
409
409
}
@@ -469,7 +469,7 @@ public async Task Can_rollback_on_error()
469
469
// Assert
470
470
httpResponse . ShouldHaveStatusCode ( HttpStatusCode . NotFound ) ;
471
471
472
- responseDocument . Errors . ShouldHaveCount ( 1 ) ;
472
+ responseDocument . Errors . Should ( ) . HaveCount ( 1 ) ;
473
473
474
474
ErrorObject error = responseDocument . Errors [ 0 ] ;
475
475
error . StatusCode . Should ( ) . Be ( HttpStatusCode . NotFound ) ;
@@ -484,7 +484,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
484
484
peopleInDatabase . Should ( ) . BeEmpty ( ) ;
485
485
} ) ;
486
486
487
- store . SqlCommands . ShouldHaveCount ( 5 ) ;
487
+ store . SqlCommands . Should ( ) . HaveCount ( 5 ) ;
488
488
489
489
store . SqlCommands [ 0 ] . With ( command =>
490
490
{
@@ -494,7 +494,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
494
494
RETURNING "Id"
495
495
""" ) ) ;
496
496
497
- command . Parameters . ShouldHaveCount ( 3 ) ;
497
+ command . Parameters . Should ( ) . HaveCount ( 3 ) ;
498
498
command . Parameters . Should ( ) . Contain ( "@p1" , null ) ;
499
499
command . Parameters . Should ( ) . Contain ( "@p2" , newPerson . LastName ) ;
500
500
command . Parameters . Should ( ) . Contain ( "@p3" , null ) ;
@@ -508,7 +508,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
508
508
WHERE t1."Id" = @p1
509
509
""" ) ) ;
510
510
511
- command . Parameters . ShouldHaveCount ( 1 ) ;
511
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
512
512
command . Parameters . ShouldContainKey ( "@p1" ) . With ( value => value . ShouldNotBeNull ( ) ) ;
513
513
} ) ;
514
514
@@ -521,7 +521,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
521
521
WHERE t1."Id" = @p1
522
522
""" ) ) ;
523
523
524
- command . Parameters . ShouldHaveCount ( 1 ) ;
524
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
525
525
command . Parameters . ShouldContainKey ( "@p1" ) . With ( value => value . ShouldNotBeNull ( ) ) ;
526
526
} ) ;
527
527
@@ -533,7 +533,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
533
533
WHERE "Id" = @p2
534
534
""" ) ) ;
535
535
536
- command . Parameters . ShouldHaveCount ( 2 ) ;
536
+ command . Parameters . Should ( ) . HaveCount ( 2 ) ;
537
537
command . Parameters . ShouldContainKey ( "@p1" ) . With ( value => value . ShouldNotBeNull ( ) ) ;
538
538
command . Parameters . Should ( ) . Contain ( "@p2" , unknownTodoItemId ) ;
539
539
} ) ;
@@ -546,7 +546,7 @@ SELECT t1."Id"
546
546
WHERE t1."Id" = @p1
547
547
""" ) ) ;
548
548
549
- command . Parameters . ShouldHaveCount ( 1 ) ;
549
+ command . Parameters . Should ( ) . HaveCount ( 1 ) ;
550
550
command . Parameters . Should ( ) . Contain ( "@p1" , unknownTodoItemId ) ;
551
551
} ) ;
552
552
}
0 commit comments