@@ -63,7 +63,7 @@ public async void OpsTenantSearch()
6363
6464 void Test ( ICollection < OpsTenant > collection )
6565 {
66- Assert . Equal ( 1 , collection . Count ) ;
66+ Assert . Single ( collection ) ;
6767 Assert . Equal ( "One" , collection . First ( ) . Name ) ;
6868 }
6969 }
@@ -78,7 +78,7 @@ public async void OpsTenantSearchAndFilter()
7878
7979 void Test ( ICollection < OpsTenant > collection )
8080 {
81- Assert . Equal ( 0 , collection . Count ) ;
81+ Assert . Empty ( collection ) ;
8282 }
8383 }
8484
@@ -92,7 +92,7 @@ public async void OpsTenantExpandBuildingsFilterEqAndOrderBy()
9292
9393 void Test ( ICollection < OpsTenant > collection )
9494 {
95- Assert . Equal ( 1 , collection . Count ) ;
95+ Assert . Single ( collection ) ;
9696 Assert . Equal ( 2 , collection . First ( ) . Buildings . Count ) ;
9797 Assert . Equal ( "One" , collection . First ( ) . Name ) ;
9898 }
@@ -141,7 +141,7 @@ public async void OpsTenantExpandBuildingsFilterNeAndOrderBy()
141141
142142 void Test ( ICollection < OpsTenant > collection )
143143 {
144- Assert . Equal ( 1 , collection . Count ) ;
144+ Assert . Single ( collection ) ;
145145 Assert . Equal ( 3 , collection . First ( ) . Buildings . Count ) ;
146146 Assert . Equal ( "Two" , collection . First ( ) . Name ) ;
147147 }
@@ -157,7 +157,7 @@ public async void OpsTenantFilterEqNoExpand()
157157
158158 void Test ( ICollection < OpsTenant > collection )
159159 {
160- Assert . Equal ( 1 , collection . Count ) ;
160+ Assert . Single ( collection ) ;
161161 Assert . Null ( collection . First ( ) . Buildings ) ;
162162 Assert . Equal ( "One" , collection . First ( ) . Name ) ;
163163 }
@@ -189,7 +189,7 @@ public async void OpsTenantFilterLtDateNoExpand()
189189
190190 void Test ( ICollection < OpsTenant > collection )
191191 {
192- Assert . Equal ( 0 , collection . Count ) ;
192+ Assert . Empty ( collection ) ;
193193 }
194194 }
195195
@@ -235,7 +235,7 @@ public async void OpsTenantNoExpandFilterEqAndOrderBy()
235235
236236 void Test ( ICollection < OpsTenant > collection )
237237 {
238- Assert . Equal ( 1 , collection . Count ) ;
238+ Assert . Single ( collection ) ;
239239 Assert . Null ( collection . First ( ) . Buildings ) ;
240240 Assert . Equal ( "One" , collection . First ( ) . Name ) ;
241241 }
@@ -251,7 +251,7 @@ public async void OpsTenantExpandBuildingsSelectNameAndBuilderExpandBuilderExpan
251251
252252 void Test ( ICollection < OpsTenant > collection )
253253 {
254- Assert . Equal ( 1 , collection . Count ) ;
254+ Assert . Single ( collection ) ;
255255 Assert . Equal ( 3 , collection . First ( ) . Buildings . Count ) ;
256256 Assert . NotNull ( collection . First ( ) . Buildings . First ( ) . Builder ) ;
257257 Assert . NotNull ( collection . First ( ) . Buildings . First ( ) . Builder . City ) ;
@@ -270,7 +270,7 @@ public async void OpsTenantExpandBuildingsExpandBuilderExpandCityFilterNeAndOrde
270270
271271 void Test ( ICollection < OpsTenant > collection )
272272 {
273- Assert . Equal ( 1 , collection . Count ) ;
273+ Assert . Single ( collection ) ;
274274 Assert . Equal ( 3 , collection . First ( ) . Buildings . Count ) ;
275275 Assert . NotNull ( collection . First ( ) . Buildings . First ( ) . Builder ) ;
276276 Assert . NotNull ( collection . First ( ) . Buildings . First ( ) . Builder . City ) ;
@@ -334,7 +334,7 @@ await GetUsingCustomNameSpace<CoreBuilding, TBuilding>
334334
335335 void Test ( ICollection < CoreBuilding > collection )
336336 {
337- Assert . Equal ( 1 , collection . Count ) ;
337+ Assert . Single ( collection ) ;
338338 Assert . Equal ( "One L1" , collection . First ( ) . Name ) ;
339339 Assert . Equal ( buildingParameterValue , collection . First ( ) . Parameter ) ;
340340 Assert . Equal ( "Sam" , collection . First ( ) . Builder . Name ) ;
@@ -352,7 +352,7 @@ public async void BuildingExpandBuilderTenantFilterEqAndOrderBy()
352352
353353 void Test ( ICollection < CoreBuilding > collection )
354354 {
355- Assert . Equal ( 1 , collection . Count ) ;
355+ Assert . Single ( collection ) ;
356356 Assert . Equal ( "Sam" , collection . First ( ) . Builder . Name ) ;
357357 Assert . Equal ( "One" , collection . First ( ) . Tenant . Name ) ;
358358 Assert . Equal ( "One L1" , collection . First ( ) . Name ) ;
@@ -369,7 +369,7 @@ public async void BuildingExpandBuilderSelectNameExpandTenantFilterEqAndOrderBy(
369369
370370 void Test ( ICollection < CoreBuilding > collection )
371371 {
372- Assert . Equal ( 1 , collection . Count ) ;
372+ Assert . Single ( collection ) ;
373373 Assert . Equal ( "Sam" , collection . First ( ) . Builder . Name ) ;
374374 Assert . Equal ( "One" , collection . First ( ) . Tenant . Name ) ;
375375 Assert . Equal ( "One L1" , collection . First ( ) . Name ) ;
@@ -504,7 +504,7 @@ public async void BuildingExpandBuilderTenantExpandCityOrderByBuilderNameSkip3Ta
504504 void Test ( ICollection < CoreBuilding > collection )
505505 {
506506 Assert . Equal ( 5 , options . Request . ODataFeature ( ) . TotalCount ) ;
507- Assert . Equal ( 1 , collection . Count ) ;
507+ Assert . Single ( collection ) ;
508508 Assert . Equal ( "London" , collection . First ( ) . Builder . City . Name ) ;
509509 Assert . Equal ( "One L1" , collection . First ( ) . Name ) ;
510510 }
@@ -527,7 +527,7 @@ public async void BuildingExpandBuilderTenantExpandCityOrderByBuilderNameSkip3Ta
527527 void Test ( ICollection < CoreBuilding > collection )
528528 {
529529 Assert . Null ( options . Request . ODataFeature ( ) . TotalCount ) ;
530- Assert . Equal ( 1 , collection . Count ) ;
530+ Assert . Single ( collection ) ;
531531 Assert . Equal ( "London" , collection . First ( ) . Builder . City . Name ) ;
532532 Assert . Equal ( "One L1" , collection . First ( ) . Name ) ;
533533 }
@@ -1090,7 +1090,7 @@ await GetUsingCustomNameSpace<CategoryModel, Category>
10901090 static void Test ( ICollection < CategoryModel > collection )
10911091 {
10921092 Assert . Equal ( 2 , collection . Count ) ;
1093- Assert . Equal ( 1 , collection . First ( ) . Products . Count ) ;
1093+ Assert . Single ( collection . First ( ) . Products ) ;
10941094 Assert . Equal ( 2 , collection . First ( ) . Products . First ( ) . AlternateAddresses . Count ( ) ) ;
10951095 }
10961096 }
@@ -1142,9 +1142,9 @@ public async void SkipOnRootNoOrderByThenExpandAndSkipOnChildCollectionNoOrderBy
11421142
11431143 static void Test ( ICollection < CategoryModel > collection )
11441144 {
1145- Assert . Equal ( 1 , collection . Count ) ;
1145+ Assert . Single ( collection ) ;
11461146 Assert . Equal ( 2 , collection . First ( ) . CategoryID ) ;
1147- Assert . Equal ( 1 , collection . First ( ) . Products . Count ) ;
1147+ Assert . Single ( collection . First ( ) . Products ) ;
11481148 Assert . Equal ( 5 , collection . First ( ) . Products . First ( ) . ProductID ) ;
11491149 Assert . Equal ( 2 , collection . First ( ) . Products . First ( ) . AlternateAddresses . Length ) ;
11501150 Assert . Equal ( 4 , collection . First ( ) . Products . First ( ) . AlternateAddresses . First ( ) . AddressID ) ;
@@ -1162,9 +1162,9 @@ public async void SkipOnRootNoOrderByThenExpandAndSkipOnChildCollectionNoOrderBy
11621162
11631163 static void Test ( ICollection < CategoryModel > collection )
11641164 {
1165- Assert . Equal ( 1 , collection . Count ) ;
1165+ Assert . Single ( collection ) ;
11661166 Assert . Equal ( 2 , collection . First ( ) . CategoryID ) ;
1167- Assert . Equal ( 1 , collection . First ( ) . Products . Count ) ;
1167+ Assert . Single ( collection . First ( ) . Products ) ;
11681168 Assert . Equal ( 5 , collection . First ( ) . Products . First ( ) . ProductID ) ;
11691169 Assert . Equal ( 2 , collection . First ( ) . Products . First ( ) . AlternateAddresses . Length ) ;
11701170 Assert . Equal ( 4 , collection . First ( ) . Products . First ( ) . AlternateAddresses . First ( ) . AddressID ) ;
@@ -1184,7 +1184,7 @@ static void Test(ICollection<CategoryModel> collection)
11841184 {
11851185 Assert . Equal ( 2 , collection . First ( ) . Products . First ( ) . ProductID ) ;
11861186 Assert . Equal ( 3 , collection . First ( ) . Products . Last ( ) . ProductID ) ;
1187- Assert . Equal ( 1 , collection . Last ( ) . Products . Count ) ;
1187+ Assert . Single ( collection . Last ( ) . Products ) ;
11881188 Assert . Equal ( 5 , collection . Last ( ) . Products . First ( ) . ProductID ) ;
11891189 }
11901190 }
@@ -1262,7 +1262,7 @@ public async void SkipOnRootNoOrderBy()
12621262
12631263 static void Test ( ICollection < CategoryModel > collection )
12641264 {
1265- Assert . Equal ( 1 , collection . Count ) ;
1265+ Assert . Single ( collection ) ;
12661266 Assert . Equal ( 2 , collection . First ( ) . CategoryID ) ;
12671267 }
12681268 }
0 commit comments