87 references to HttpResponseMessage
InMemory.FunctionalTests (1)
TestTransport\InMemoryHttpClientSlim.cs (1)
99new HttpResponseMessage(status).EnsureSuccessStatusCode();
Microsoft.AspNetCore.Authentication.Test (12)
FacebookTests.cs (3)
335var res = new HttpResponseMessage(HttpStatusCode.OK); 344var res = new HttpResponseMessage(HttpStatusCode.OK); 480var res = new HttpResponseMessage(code);
GoogleTests.cs (1)
1124var res = new HttpResponseMessage(code);
MicrosoftAccountTests.cs (1)
427var res = new HttpResponseMessage(HttpStatusCode.OK);
OAuthTests.cs (1)
535var res = new HttpResponseMessage(code);
TwitterTests.cs (6)
399var res = new HttpResponseMessage(HttpStatusCode.OK); 468var res = new HttpResponseMessage(HttpStatusCode.OK); 484var res = new HttpResponseMessage(HttpStatusCode.OK); 596return new HttpResponseMessage(HttpStatusCode.OK) 611return new HttpResponseMessage(HttpStatusCode.Forbidden) 626return new HttpResponseMessage(HttpStatusCode.Forbidden)
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
102new HttpResponseMessage(status).EnsureSuccessStatusCode();
Microsoft.AspNetCore.SignalR.Client.Tests (6)
LongPollingTransportTests.cs (3)
725responseTaskCompletionSource.TrySetResult(new HttpResponseMessage(HttpStatusCode.OK)); 729responseTaskCompletionSource.TrySetResult(new HttpResponseMessage(HttpStatusCode.NoContent)); 733return await Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK));
ResponseUtils.cs (1)
28return new HttpResponseMessage(statusCode)
ServerSentEventsTransportTests.cs (2)
419responseTaskCompletionSource.SetResult(new HttpResponseMessage(HttpStatusCode.OK)); 423responseTaskCompletionSource.SetResult(new HttpResponseMessage(HttpStatusCode.NoContent));
Microsoft.AspNetCore.Testing.Tests (3)
TestResources\ReturningHttpClientHandler.cs (2)
16return new(HttpStatusCode.Gone); 22return Task.FromResult(new HttpResponseMessage(HttpStatusCode.Gone));
TestResources\TestHandler.cs (1)
16return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK));
Microsoft.Build.Tasks.UnitTests (11)
DownloadFile_Tests.cs (11)
38HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 67HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 92using HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK) 146HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 186HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.NotFound)), 210HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 241HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.RequestTimeout)), 290return new HttpResponseMessage(HttpStatusCode.InternalServerError); 293return new HttpResponseMessage(HttpStatusCode.OK) 323HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK) 352HttpMessageHandler = new MockHttpMessageHandler((message, token) => new HttpResponseMessage(HttpStatusCode.OK)
Microsoft.DotNet.Build.Tasks.Feed.Tests (19)
GeneralTests.cs (6)
64new HttpResponseMessage(feedResponseStatusCode)); 86new HttpResponseMessage(initialResponseStatusCode), 87new HttpResponseMessage(HttpStatusCode.OK) 118var response = new HttpResponseMessage(feedResponseStatusCode); 156new HttpResponseMessage(initialResponseStatusCode) 160new HttpResponseMessage(HttpStatusCode.OK)
PublishToSymbolServerTest.cs (13)
239var response = new HttpResponseMessage(HttpStatusCode.OK) 276new HttpResponseMessage(httpStatus) 280new HttpResponseMessage(httpStatus) 284new HttpResponseMessage(httpStatus) 319new HttpResponseMessage(httpStatus) 323new HttpResponseMessage(httpStatus) 327new HttpResponseMessage(httpStatus) 362new HttpResponseMessage(httpStatus) 366new HttpResponseMessage(HttpStatusCode.OK) 398var responses = new HttpResponseMessage(HttpStatusCode.OK) 427new HttpResponseMessage(httpStatus) 431new HttpResponseMessage(httpStatus) 435new HttpResponseMessage(httpStatus)
Microsoft.DotNet.Helix.Sdk.Tests (16)
FindDotNetCliPackageTests.cs (16)
28ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 33ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 38ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 43ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) 76ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 81ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) 126ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 132ResponseMessage = new HttpResponseMessage(HttpStatusCode.Forbidden) 179ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 184ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 189ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102")} 194ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 245ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102") } 250ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound) 255ResponseMessage = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("6.0.102") } 260ResponseMessage = new HttpResponseMessage(HttpStatusCode.NotFound)
Microsoft.Extensions.Http.Diagnostics.Tests (5)
Logging\HttpClientLoggerTest.cs (5)
146new TestingHandlerStub((_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 684new TestingHandlerStub((_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 727new TestingHandlerStub((_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 765(_, _) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)))); 954Task.FromResult(new HttpResponseMessage((HttpStatusCode)httpStatusCode))));
Microsoft.Extensions.Http.Polly.Tests (4)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (4)
247(req) => new HttpResponseMessage(statusCode), 248(req) => new HttpResponseMessage(HttpStatusCode.OK), 293(req) => new HttpResponseMessage(HttpStatusCode.OK), 569return Task.FromResult(new HttpResponseMessage(HttpStatusCode.Created));
Microsoft.Extensions.Http.Resilience.Tests (8)
Hedging\HedgingTests.cs (1)
334_responses.Enqueue(new HttpResponseMessage(statusCode));
Hedging\HttpClientHedgingResiliencePredicatesTests.cs (1)
42using var response = new HttpResponseMessage(code);
Hedging\StandardHedgingTests.cs (3)
116using var response = new HttpResponseMessage(HttpStatusCode.OK); 361return new HttpResponseMessage(HttpStatusCode.OK); 375return new HttpResponseMessage(HttpStatusCode.OK);
Helpers\TestHandlerStub.cs (1)
17: this((_, _) => Task.FromResult(new HttpResponseMessage(statusCode)))
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
245return Task.FromResult(new HttpResponseMessage(HttpStatusCode.InternalServerError));
Resilience\HttpResilienceMetricsEnricherTests.cs (1)
46using var response = new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError);
System.Net.Http (1)
System\Net\Http\HttpResponseMessage.cs (1)
148: this(DefaultStatusCode)