@@ -8,7 +8,8 @@ struct FetchRecordsResponseTests {
8
8
func response_records_empty( ) throws {
9
9
let input = """
10
10
{
11
- " records " : []
11
+ " records " : [],
12
+ " totalCount " : null
12
13
}
13
14
"""
14
15
let data = try #require( input. data ( using: . utf8) )
@@ -31,7 +32,8 @@ struct FetchRecordsResponseTests {
31
32
" value " : " 1 "
32
33
}
33
34
}
34
- ]
35
+ ],
36
+ " totalCount " : 1
35
37
}
36
38
"""
37
39
let data = try #require( input. data ( using: . utf8) )
@@ -41,6 +43,7 @@ struct FetchRecordsResponseTests {
41
43
#expect( record. identity. id == 1 )
42
44
#expect( record. identity. revision == 1 )
43
45
#expect( record. fields. isEmpty)
46
+ #expect( actual. totalCount == 1 )
44
47
}
45
48
46
49
@Test
@@ -62,7 +65,8 @@ struct FetchRecordsResponseTests {
62
65
" value " : " 0 "
63
66
}
64
67
}
65
- ]
68
+ ],
69
+ " totalCount " : 1
66
70
}
67
71
"""
68
72
let data = try #require( input. data ( using: . utf8) )
@@ -100,7 +104,8 @@ struct FetchRecordsResponseTests {
100
104
" value " : [ " dummy0 " , " dummy1 " ]
101
105
}
102
106
}
103
- ]
107
+ ],
108
+ " totalCount " : 1
104
109
}
105
110
"""
106
111
let data = try #require( input. data ( using: . utf8) )
@@ -138,7 +143,8 @@ struct FetchRecordsResponseTests {
138
143
" value " : [ " dummy0 " , " dummy1 " ]
139
144
}
140
145
}
141
- ]
146
+ ],
147
+ " totalCount " : 1
142
148
}
143
149
"""
144
150
let data = try #require( input. data ( using: . utf8) )
@@ -176,7 +182,8 @@ struct FetchRecordsResponseTests {
176
182
" value " : " 0001-01-01T00:00:00Z "
177
183
}
178
184
}
179
- ]
185
+ ],
186
+ " totalCount " : 1
180
187
}
181
188
"""
182
189
let data = try #require( input. data ( using: . utf8) )
@@ -217,7 +224,8 @@ struct FetchRecordsResponseTests {
217
224
}
218
225
}
219
226
}
220
- ]
227
+ ],
228
+ " totalCount " : 1
221
229
}
222
230
"""
223
231
let data = try #require( input. data ( using: . utf8) )
@@ -259,7 +267,8 @@ struct FetchRecordsResponseTests {
259
267
" value " : \( dateProperty. value)
260
268
}
261
269
}
262
- ]
270
+ ],
271
+ " totalCount " : 1
263
272
}
264
273
"""
265
274
let data = try #require( input. data ( using: . utf8) )
@@ -300,7 +309,8 @@ struct FetchRecordsResponseTests {
300
309
" value " : \( dateTimeProperty. value)
301
310
}
302
311
}
303
- ]
312
+ ],
313
+ " totalCount " : 1
304
314
}
305
315
"""
306
316
let data = try #require( input. data ( using: . utf8) )
@@ -341,7 +351,8 @@ struct FetchRecordsResponseTests {
341
351
" value " : \( dropDownProperty. value)
342
352
}
343
353
}
344
- ]
354
+ ],
355
+ " totalCount " : 1
345
356
}
346
357
"""
347
358
let data = try #require( input. data ( using: . utf8) )
@@ -386,7 +397,8 @@ struct FetchRecordsResponseTests {
386
397
]
387
398
}
388
399
}
389
- ]
400
+ ],
401
+ " totalCount " : 1
390
402
}
391
403
"""
392
404
let data = try #require( input. data ( using: . utf8) )
@@ -434,7 +446,8 @@ struct FetchRecordsResponseTests {
434
446
]
435
447
}
436
448
}
437
- ]
449
+ ],
450
+ " totalCount " : 1
438
451
}
439
452
"""
440
453
let data = try #require( input. data ( using: . utf8) )
@@ -476,7 +489,8 @@ struct FetchRecordsResponseTests {
476
489
" value " : " dummy "
477
490
}
478
491
}
479
- ]
492
+ ],
493
+ " totalCount " : 1
480
494
}
481
495
"""
482
496
let data = try #require( input. data ( using: . utf8) )
@@ -517,7 +531,8 @@ struct FetchRecordsResponseTests {
517
531
}
518
532
}
519
533
}
520
- ]
534
+ ],
535
+ " totalCount " : 1
521
536
}
522
537
"""
523
538
let data = try #require( input. data ( using: . utf8) )
@@ -556,7 +571,8 @@ struct FetchRecordsResponseTests {
556
571
" value " : " dummy \\ ndummy "
557
572
}
558
573
}
559
- ]
574
+ ],
575
+ " totalCount " : 1
560
576
}
561
577
"""
562
578
let data = try #require( input. data ( using: . utf8) )
@@ -594,7 +610,8 @@ struct FetchRecordsResponseTests {
594
610
" value " : [ " dummy0 " , " dummy1 " ]
595
611
}
596
612
}
597
- ]
613
+ ],
614
+ " totalCount " : 1
598
615
}
599
616
"""
600
617
let data = try #require( input. data ( using: . utf8) )
@@ -632,7 +649,8 @@ struct FetchRecordsResponseTests {
632
649
" value " : " 123.456 "
633
650
}
634
651
}
635
- ]
652
+ ],
653
+ " totalCount " : 1
636
654
}
637
655
"""
638
656
let data = try #require( input. data ( using: . utf8) )
@@ -675,7 +693,8 @@ struct FetchRecordsResponseTests {
675
693
]
676
694
}
677
695
}
678
- ]
696
+ ],
697
+ " totalCount " : 1
679
698
}
680
699
"""
681
700
let data = try #require( input. data ( using: . utf8) )
@@ -720,7 +739,8 @@ struct FetchRecordsResponseTests {
720
739
" value " : \( radioButtonProperty. value)
721
740
}
722
741
}
723
- ]
742
+ ],
743
+ " totalCount " : 1
724
744
}
725
745
"""
726
746
let data = try #require( input. data ( using: . utf8) )
@@ -758,7 +778,8 @@ struct FetchRecordsResponseTests {
758
778
" value " : " DUMMY-1 "
759
779
}
760
780
}
761
- ]
781
+ ],
782
+ " totalCount " : 1
762
783
}
763
784
"""
764
785
let data = try #require( input. data ( using: . utf8) )
@@ -796,7 +817,8 @@ struct FetchRecordsResponseTests {
796
817
" value " : " <h1>dummy</h1> "
797
818
}
798
819
}
799
- ]
820
+ ],
821
+ " totalCount " : 1
800
822
}
801
823
"""
802
824
let data = try #require( input. data ( using: . utf8) )
@@ -834,7 +856,8 @@ struct FetchRecordsResponseTests {
834
856
" value " : " dummy "
835
857
}
836
858
}
837
- ]
859
+ ],
860
+ " totalCount " : 1
838
861
}
839
862
"""
840
863
let data = try #require( input. data ( using: . utf8) )
@@ -872,7 +895,8 @@ struct FetchRecordsResponseTests {
872
895
" value " : " dummy "
873
896
}
874
897
}
875
- ]
898
+ ],
899
+ " totalCount " : 1
876
900
}
877
901
"""
878
902
let data = try #require( input. data ( using: . utf8) )
@@ -915,7 +939,8 @@ struct FetchRecordsResponseTests {
915
939
]
916
940
}
917
941
}
918
- ]
942
+ ],
943
+ " totalCount " : 1
919
944
}
920
945
"""
921
946
let data = try #require( input. data ( using: . utf8) )
@@ -965,7 +990,8 @@ struct FetchRecordsResponseTests {
965
990
]
966
991
}
967
992
}
968
- ]
993
+ ],
994
+ " totalCount " : 1
969
995
}
970
996
"""
971
997
let data = try #require( input. data ( using: . utf8) )
@@ -1022,7 +1048,8 @@ struct FetchRecordsResponseTests {
1022
1048
" value " : \( timeProperty. value)
1023
1049
}
1024
1050
}
1025
- ]
1051
+ ],
1052
+ " totalCount " : 1
1026
1053
}
1027
1054
"""
1028
1055
let data = try #require( input. data ( using: . utf8) )
@@ -1060,7 +1087,8 @@ struct FetchRecordsResponseTests {
1060
1087
" value " : " 0001-01-01T00:00:00Z "
1061
1088
}
1062
1089
}
1063
- ]
1090
+ ],
1091
+ " totalCount " : 1
1064
1092
}
1065
1093
"""
1066
1094
let data = try #require( input. data ( using: . utf8) )
@@ -1103,7 +1131,8 @@ struct FetchRecordsResponseTests {
1103
1131
]
1104
1132
}
1105
1133
}
1106
- ]
1134
+ ],
1135
+ " totalCount " : 1
1107
1136
}
1108
1137
"""
1109
1138
let data = try #require( input. data ( using: . utf8) )
0 commit comments