Base:
property
Response
Microsoft.AspNetCore.Http.HttpContext.Response
26 writes to Response
Microsoft.AspNetCore.Http.Extensions.Tests (7)
ProblemDetailsServiceTest.cs (6)
26Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
52Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
71Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
87Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
102Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
122Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
Microsoft.AspNetCore.Http.Results.Tests (18)
Microsoft.AspNetCore.Mvc.Core.Test (1)
614 references to Response
Aspire.Dashboard.Tests (7)
HttpAbstractions.SampleApp (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (27)
Microsoft.AspNetCore.Components.Server.Tests (7)
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (18)
ContentEncodingNegotiatorTests.cs (18)
29Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
31Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
51Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
52Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
72Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
74Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
95Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
97Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
118Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
120Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
141Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
143Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
164Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
166Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
186Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
187Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
207Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
209Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
Microsoft.AspNetCore.Cors.Test (39)
CorsServiceTests.cs (35)
570service.ApplyResult(result, httpContext.Response);
573Assert.Empty(httpContext.Response.Headers);
590service.ApplyResult(result, httpContext.Response);
593Assert.Equal("http://example.com", httpContext.Response.Headers["Access-Control-Allow-Origin"]);
610service.ApplyResult(result, httpContext.Response);
613Assert.DoesNotContain("Access-Control-Allow-Origin", httpContext.Response.Headers.Keys);
630service.ApplyResult(result, httpContext.Response);
633Assert.Equal("true", httpContext.Response.Headers["Access-Control-Allow-Credentials"]);
650service.ApplyResult(result, httpContext.Response);
653Assert.Equal("Origin", httpContext.Response.Headers["Vary"]);
667httpContext.Response.Headers["Vary"] = "Cookie";
671service.ApplyResult(result, httpContext.Response);
674Assert.Equal("Cookie,Origin", httpContext.Response.Headers["Vary"]);
691service.ApplyResult(result, httpContext.Response);
694Assert.DoesNotContain("Access-Control-Allow-Credentials", httpContext.Response.Headers.Keys);
711service.ApplyResult(result, httpContext.Response);
714Assert.DoesNotContain("Access-Control-Allow-Methods", httpContext.Response.Headers.Keys);
732service.ApplyResult(result, httpContext.Response);
735Assert.Equal("PUT", httpContext.Response.Headers["Access-Control-Allow-Methods"]);
752service.ApplyResult(result, httpContext.Response);
755Assert.DoesNotContain("Access-Control-Allow-Headers", httpContext.Response.Headers.Keys);
773service.ApplyResult(result, httpContext.Response);
776Assert.Equal("foo", httpContext.Response.Headers["Access-Control-Allow-Headers"]);
793service.ApplyResult(result, httpContext.Response);
796Assert.DoesNotContain("Access-Control-Expose-Headers", httpContext.Response.Headers.Keys);
814service.ApplyResult(result, httpContext.Response);
817Assert.DoesNotContain("Access-Control-Expose-Headers", httpContext.Response.Headers.Keys);
835service.ApplyResult(result, httpContext.Response);
838Assert.Equal("foo,bar", httpContext.Response.Headers[CorsConstants.AccessControlExposeHeaders]);
855service.ApplyResult(result, httpContext.Response);
858Assert.Equal("foo", httpContext.Response.Headers["Access-Control-Expose-Headers"]);
876service.ApplyResult(result, httpContext.Response);
879Assert.DoesNotContain("Access-Control-Max-Age", httpContext.Response.Headers.Keys);
896service.ApplyResult(result, httpContext.Response);
899Assert.Equal("30", httpContext.Response.Headers["Access-Control-Max-Age"]);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (67)
UnaryServerCallHandlerTests.cs (61)
73Assert.Equal(200, httpContext.Response.StatusCode);
74Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType);
80httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
81using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
118httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
119using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
149httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
150var sr = new StreamReader(httpContext.Response.Body);
178httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
179using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
715httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
716using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
745Assert.Equal(400, httpContext.Response.StatusCode);
747httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
748using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
783Assert.Equal(400, httpContext.Response.StatusCode);
785httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
786using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
812Assert.Equal(400, httpContext.Response.StatusCode);
815httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
816using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
837Assert.Equal(401, httpContext.Response.StatusCode);
839httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
840using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
862Assert.Equal(401, httpContext.Response.StatusCode);
864httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
865using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
929Assert.Equal(400, httpContext.Response.StatusCode);
931httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
932using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1007Assert.Equal(500, httpContext.Response.StatusCode);
1009httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1010using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1049Assert.Equal(500, httpContext.Response.StatusCode);
1051httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1052using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1079Assert.Equal(500, httpContext.Response.StatusCode);
1081httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1082using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1108Assert.Equal(401, httpContext.Response.StatusCode);
1110httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1111using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1150Assert.Equal(200, httpContext.Response.StatusCode);
1151Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType);
1153httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1154using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1204Assert.Equal(200, httpContext.Response.StatusCode);
1205Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType);
1207httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1208using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1234httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1235using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1363Assert.Equal(200, httpContext.Response.StatusCode);
1364Assert.Equal("application/xml", httpContext.Response.ContentType);
1366httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1367var responseXml = XDocument.Load(httpContext.Response.Body);
1471Assert.Equal(500, httpContext.Response.StatusCode);
1473httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1474using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
1734httpContext.Response.Body.Seek(0, SeekOrigin.Begin);
1735using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
Microsoft.AspNetCore.Hosting.Tests (3)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Connections.Tests (122)
HttpConnectionDispatcherTests.cs (109)
68context.Response.Body = ms;
92context.Response.Body = ms;
118context.Response.Body = ms;
155context.Response.Body = ms;
183context.Response.Body = ms;
221context.Response.Body = responseBody;
270context.Response.Body = ms;
301context.Response.Body = strm;
320Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
326AssertResponseHasCacheHeaders(context.Response);
343context.Response.Body = strm;
361Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
381context.Response.Body = strm;
399Assert.Equal(StatusCodes.Status405MethodNotAllowed, context.Response.StatusCode);
420context.Response.Body = strm;
438Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
459context.Response.Body = strm;
522context.Response.Body = strm;
591context.Response.Body = responseBody;
730AssertResponseHasCacheHeaders(context.Response);
737AssertResponseHasCacheHeaders(pollContext.Response);
756context.Response.Body = responseBody;
791Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
803Assert.Equal("application/octet-stream", context.Response.ContentType);
854context.Response.Body = strm;
869Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
875AssertResponseHasCacheHeaders(context.Response);
900context.Response.Body = responseBody;
915Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
930context.Response.Body = strm;
943Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
1017Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1049Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1076Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1080Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1081AssertResponseHasCacheHeaders(context.Response);
1112Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1116Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1117AssertResponseHasCacheHeaders(context.Response);
1148Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1155Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1156AssertResponseHasCacheHeaders(context.Response);
1201Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1202AssertResponseHasCacheHeaders(context.Response);
1295context.Response.Body = new BlockingStream(sync);
1333context.Response.Body = new BlockingStream(sync, isSSE: true);
1457Assert.Equal(StatusCodes.Status409Conflict, context2.Response.StatusCode);
1515Assert.Equal(StatusCodes.Status204NoContent, context1.Response.StatusCode);
1516AssertResponseHasCacheHeaders(context1.Response);
1581Assert.Equal(StatusCodes.Status409Conflict, context1.Response.StatusCode);
1583AssertResponseHasCacheHeaders(context1.Response);
1587Assert.Equal(StatusCodes.Status409Conflict, context2.Response.StatusCode);
1589AssertResponseHasCacheHeaders(context2.Response);
1625Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
1629AssertResponseHasCacheHeaders(context.Response);
1665Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1697Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1726Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1738Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1739AssertResponseHasCacheHeaders(context.Response);
1780Assert.Equal(StatusCodes.Status204NoContent, context1.Response.StatusCode);
1781Assert.Equal(string.Empty, GetContentAsString(context1.Response.Body));
1782AssertResponseHasCacheHeaders(context1.Response);
1783Assert.Equal(StatusCodes.Status200OK, context2.Response.StatusCode);
1784Assert.Equal("Hello, World", GetContentAsString(context2.Response.Body));
1785AssertResponseHasCacheHeaders(context2.Response);
1859Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1871Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1911Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1923Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
2038deleteContext.Response.Body = ms;
2043Assert.Equal(StatusCodes.Status400BadRequest, deleteContext.Response.StatusCode);
2044Assert.Equal("text/plain", deleteContext.Response.ContentType);
2092Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2093Assert.Equal("text/plain", deleteContext.Response.ContentType);
2134Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2135Assert.Equal("text/plain", deleteContext.Response.ContentType);
2196Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2197Assert.Equal("text/plain", deleteContext.Response.ContentType);
2239context.Response.Body = ms;
2249context.Response.Body = ms;
2272context.Response.Body = ms;
2298context.Response.Body = ms;
2327context.Response.Body = ms;
2356context.Response.Body = ms;
2503Assert.Equal(409, context.Response.StatusCode);
2567context.Response.Body = responseBody;
2595Assert.Equal(404, context.Response.StatusCode);
2627context.Response.Body = responseBody;
2652Assert.Equal(404, context.Response.StatusCode);
2684context.Response.Body = responseBody;
2750Assert.Equal(StatusCodes.Status500InternalServerError, pollContext.Response.StatusCode);
2752AssertResponseHasCacheHeaders(pollContext.Response);
2802Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2803Assert.Equal("text/plain", deleteContext.Response.ContentType);
2981pollContext.Response.Body.Position = 0;
2982Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout());
2993pollContext.Response.Body.Position = 0;
2994Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout());
3038pollContext.Response.Body.Position = 0;
3039Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout());
3048pollContext.Response.Body.Position = 0;
3049Assert.Equal(3, await pollContext.Response.Body.ReadAsync(memory).DefaultTimeout());
3170context.Response.Body.Position = 0;
3171Assert.Equal(1, await context.Response.Body.ReadAsync(memory).DefaultTimeout());
3692context.Response.Body = strm;
3713Assert.Equal(status, context.Response.StatusCode);
3725AssertResponseHasCacheHeaders(context.Response);
3745context.Response.Body = new MemoryStream();
Microsoft.AspNetCore.Http.Extensions.Tests (132)
HttpResponseJsonExtensionsTests.cs (69)
26context.Response.Body = body;
29await context.Response.WriteAsJsonAsync(1);
32Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
33Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
45context.Response.Body = body;
48await context.Response.WriteAsJsonAsync<Uri?>(value: null);
51Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
63context.Response.Body = body;
68await context.Response.WriteAsJsonAsync(new int[] { 1, 2, 3 }, options);
71Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
96context.Response.Body = body;
99context.Response.StatusCode = StatusCodes.Status418ImATeapot;
100await context.Response.WriteAsJsonAsync(1);
103Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
104Assert.Equal(StatusCodes.Status418ImATeapot, context.Response.StatusCode);
113context.Response.Body = body;
116await context.Response.WriteAsJsonAsync(1, options: null, contentType: "application/custom-type");
119Assert.Equal("application/custom-type", context.Response.ContentType);
127context.Response.Body = new TestStream();
132var writeTask = context.Response.WriteAsJsonAsync(1, cts.Token);
147context.Response.Body = body;
154await context.Response.WriteAsJsonAsync(value);
167context.Response.Body = body;
170await context.Response.WriteAsJsonAsync(1, typeof(int));
173Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
174Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
186context.Response.Body = body;
189await context.Response.WriteAsJsonAsync(value: null, typeof(int?));
192Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
204context.Response.Body = body;
207await Assert.ThrowsAsync<ArgumentNullException>(async () => await context.Response.WriteAsJsonAsync(value: null, type: null!));
216context.Response.Body = body;
228context.Response.Body = body;
235await context.Response.WriteAsJsonAsync(value, typeof(TestObject));
248context.Response.Body = body;
251context.Response.StatusCode = StatusCodes.Status418ImATeapot;
252await context.Response.WriteAsJsonAsync(1, typeof(int));
255Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
256Assert.Equal(StatusCodes.Status418ImATeapot, context.Response.StatusCode);
265context.Response.Body = body;
268await context.Response.WriteAsJsonAsync(AsyncEnumerable());
271Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
272Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
290context.Response.Body = body;
293await context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>));
296Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
297Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
316context.Response.Body = body;
321await context.Response.WriteAsJsonAsync(AsyncEnumerable());
324Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
325Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
350context.Response.Body = body;
355await context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>));
358Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
359Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
383context.Response.Body = body;
389await Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>), cts.Token));
392Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
393Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
417context.Response.Body = body;
423await Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Response.WriteAsJsonAsync(AsyncEnumerable(), cts.Token));
426Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
427Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
451context.Response.Body = body;
457await context.Response.WriteAsJsonAsync(new int[] { 1, 2, 3 }, (JsonTypeInfo<int[]>)options.GetTypeInfo(typeof(int[])));
460Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
472context.Response.Body = body;
478await context.Response.WriteAsJsonAsync(value : null, options.GetTypeInfo(typeof(Uri)));
481Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);
RequestDelegateFactoryTests.cs (41)
767Assert.Equal(200, httpContext.Response.StatusCode);
768Assert.False(httpContext.Response.HasStarted);
896Assert.Equal(400, httpContext.Response.StatusCode);
1294Assert.Equal(httpContext.Response, httpResponseArgument);
1347httpContext.Response.Body = responseBodyStream;
1380httpContext.Response.Body = responseBodyStream;
1409httpContext.Response.Body = responseBodyStream;
1476httpContext.Response.Body = responseBodyStream;
1515httpContext.Response.Body = responseBodyStream;
1560httpContext.Response.Body = responseBodyStream;
1580Assert.Equal(400, httpContext.Response.StatusCode);
1589Assert.Equal(200, httpContext.Response.StatusCode);
1679Assert.Equal(400, httpContext.Response.StatusCode);
1695Assert.Equal(200, httpContext.Response.StatusCode);
1754Assert.Equal(200, httpContext.Response.StatusCode);
1773httpContext.Response.Body = responseBodyStream;
1788Assert.Equal(200, httpContext.Response.StatusCode);
1803httpContext.Response.Body = responseBodyStream;
1818Assert.Equal(200, httpContext.Response.StatusCode);
1833httpContext.Response.Body = responseBodyStream;
1848Assert.Equal(200, httpContext.Response.StatusCode);
1863httpContext.Response.Body = responseBodyStream;
1875Assert.Equal(200, httpContext.Response.StatusCode);
1903httpContext.Response.Body = responseBodyStream;
1915Assert.Equal(200, httpContext.Response.StatusCode);
1951Assert.Equal(413, httpContext.Response.StatusCode);
1984Assert.Equal(413, httpContext.Response.StatusCode);
2159httpContext.Response.Body = responseBodyStream;
2180Assert.Equal(200, httpContext.Response.StatusCode);
2196httpContext.Response.Body = responseBodyStream;
2223Assert.Equal(200, httpContext.Response.StatusCode);
2278httpContext.Response.Body = responseBodyStream;
2294Assert.Equal(200, httpContext.Response.StatusCode);
2373httpContext.Response.Body = responseBodyStream;
2389Assert.Equal(200, httpContext.Response.StatusCode);
2407httpContext.Response.Body = responseBodyStream;
2426Assert.Equal(400, httpContext.Response.StatusCode);
2492httpContext.Response.Body = responseBodyStream;
2508Assert.Equal(200, httpContext.Response.StatusCode);
3152Assert.Equal(200, httpContext.Response.StatusCode);
3199Assert.Equal(400, httpContext.Response.StatusCode);
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results.Tests (35)
Microsoft.AspNetCore.Http.Tests (30)
Microsoft.AspNetCore.HttpLogging.Tests (15)
Microsoft.AspNetCore.Mvc.Core.Test (32)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (16)
Microsoft.AspNetCore.OpenApi.Tests (10)
Microsoft.AspNetCore.RateLimiting.Tests (21)
RateLimitingMiddlewareTests.cs (17)
106Assert.Equal(StatusCodes.Status503ServiceUnavailable, context.Response.StatusCode);
131Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
155Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
213Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
249Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
280Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
312Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
344Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
376Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
419Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
454Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
460Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
505Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
541Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
549Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
579Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
619Assert.Equal(StatusCodes.Status403Forbidden, context.Response.StatusCode);
Microsoft.AspNetCore.ResponseCompression.Tests (2)
Microsoft.AspNetCore.Routing.Tests (15)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.StaticFiles.Tests (1)