@@ -26,7 +26,7 @@ public async Task WriteAsJsonAsyncGeneric_SimpleValue_JsonResponse()
2626 await context . Response . WriteAsJsonAsync ( 1 ) ;
2727
2828 // Assert
29- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
29+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
3030 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
3131
3232 var data = body . ToArray ( ) ;
@@ -45,7 +45,7 @@ public async Task WriteAsJsonAsyncGeneric_NullValue_JsonResponse()
4545 await context . Response . WriteAsJsonAsync < Uri ? > ( value : null ) ;
4646
4747 // Assert
48- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
48+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
4949
5050 var data = Encoding . UTF8 . GetString ( body . ToArray ( ) ) ;
5151 Assert . Equal ( "null" , data ) ;
@@ -65,7 +65,7 @@ public async Task WriteAsJsonAsyncGeneric_WithOptions_JsonResponse()
6565 await context . Response . WriteAsJsonAsync ( new int [ ] { 1 , 2 , 3 } , options ) ;
6666
6767 // Assert
68- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
68+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
6969
7070 var data = Encoding . UTF8 . GetString ( body . ToArray ( ) ) ;
7171 Assert . Equal ( "[false,true,false]" , data ) ;
@@ -97,7 +97,7 @@ public async Task WriteAsJsonAsyncGeneric_CustomStatusCode_StatusCodeUnchanged()
9797 await context . Response . WriteAsJsonAsync ( 1 ) ;
9898
9999 // Assert
100- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
100+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
101101 Assert . Equal ( StatusCodes . Status418ImATeapot , context . Response . StatusCode ) ;
102102 }
103103
@@ -167,7 +167,7 @@ public async Task WriteAsJsonAsync_SimpleValue_JsonResponse()
167167 await context . Response . WriteAsJsonAsync ( 1 , typeof ( int ) ) ;
168168
169169 // Assert
170- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
170+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
171171 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
172172
173173 var data = body . ToArray ( ) ;
@@ -186,7 +186,7 @@ public async Task WriteAsJsonAsync_NullValue_JsonResponse()
186186 await context . Response . WriteAsJsonAsync ( value : null , typeof ( int ? ) ) ;
187187
188188 // Assert
189- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
189+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
190190
191191 var data = Encoding . UTF8 . GetString ( body . ToArray ( ) ) ;
192192 Assert . Equal ( "null" , data ) ;
@@ -249,7 +249,7 @@ public async Task WriteAsJsonAsync_CustomStatusCode_StatusCodeUnchanged()
249249 await context . Response . WriteAsJsonAsync ( 1 , typeof ( int ) ) ;
250250
251251 // Assert
252- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
252+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
253253 Assert . Equal ( StatusCodes . Status418ImATeapot , context . Response . StatusCode ) ;
254254 }
255255
@@ -265,7 +265,7 @@ public async Task WriteAsJsonAsyncGeneric_AsyncEnumerable()
265265 await context . Response . WriteAsJsonAsync ( AsyncEnumerable ( ) ) ;
266266
267267 // Assert
268- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
268+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
269269 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
270270
271271 Assert . Equal ( "[1,2]" , Encoding . UTF8 . GetString ( body . ToArray ( ) ) ) ;
@@ -290,7 +290,7 @@ public async Task WriteAsJsonAsync_AsyncEnumerable()
290290 await context . Response . WriteAsJsonAsync ( AsyncEnumerable ( ) , typeof ( IAsyncEnumerable < int > ) ) ;
291291
292292 // Assert
293- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
293+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
294294 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
295295
296296 Assert . Equal ( "[1,2]" , Encoding . UTF8 . GetString ( body . ToArray ( ) ) ) ;
@@ -318,7 +318,7 @@ public async Task WriteAsJsonAsyncGeneric_AsyncEnumerable_ClosedConnecton()
318318 await context . Response . WriteAsJsonAsync ( AsyncEnumerable ( ) ) ;
319319
320320 // Assert
321- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
321+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
322322 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
323323
324324 // System.Text.Json might write the '[' before cancellation is observed
@@ -352,7 +352,7 @@ public async Task WriteAsJsonAsync_AsyncEnumerable_ClosedConnecton()
352352 await context . Response . WriteAsJsonAsync ( AsyncEnumerable ( ) , typeof ( IAsyncEnumerable < int > ) ) ;
353353
354354 // Assert
355- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
355+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
356356 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
357357
358358 // System.Text.Json might write the '[' before cancellation is observed
@@ -386,7 +386,7 @@ public async Task WriteAsJsonAsync_AsyncEnumerable_UserPassedTokenThrows()
386386 await Assert . ThrowsAnyAsync < OperationCanceledException > ( ( ) => context . Response . WriteAsJsonAsync ( AsyncEnumerable ( ) , typeof ( IAsyncEnumerable < int > ) , cts . Token ) ) ;
387387
388388 // Assert
389- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
389+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
390390 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
391391
392392 // System.Text.Json might write the '[' before cancellation is observed
@@ -420,7 +420,7 @@ public async Task WriteAsJsonAsyncGeneric_AsyncEnumerable_UserPassedTokenThrows(
420420 await Assert . ThrowsAnyAsync < OperationCanceledException > ( ( ) => context . Response . WriteAsJsonAsync ( AsyncEnumerable ( ) , cts . Token ) ) ;
421421
422422 // Assert
423- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
423+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
424424 Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
425425
426426 // System.Text.Json might write the '[' before cancellation is observed
@@ -454,7 +454,7 @@ public async Task WriteAsJsonAsyncGeneric_WithJsonTypeInfo_JsonResponse()
454454 await context . Response . WriteAsJsonAsync ( new int [ ] { 1 , 2 , 3 } , ( JsonTypeInfo < int [ ] > ) options . GetTypeInfo ( typeof ( int [ ] ) ) ) ;
455455
456456 // Assert
457- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
457+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
458458
459459 var data = Encoding . UTF8 . GetString ( body . ToArray ( ) ) ;
460460 Assert . Equal ( "[1,2,3]" , data ) ;
@@ -475,7 +475,7 @@ public async Task WriteAsJsonAsync_NullValue_WithJsonTypeInfo_JsonResponse()
475475 await context . Response . WriteAsJsonAsync ( value : null , options . GetTypeInfo ( typeof ( Uri ) ) ) ;
476476
477477 // Assert
478- Assert . Equal ( JsonConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
478+ Assert . Equal ( ContentTypeConstants . JsonContentTypeWithCharset , context . Response . ContentType ) ;
479479
480480 var data = Encoding . UTF8 . GetString ( body . ToArray ( ) ) ;
481481 Assert . Equal ( "null" , data ) ;
0 commit comments