84 references to CreateResponse
Microsoft.AspNetCore.SignalR.Client.Tests (84)
HttpConnectionTests.ConnectionLifecycle.cs (6)
298
longPollResult.TrySetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
302
httpHandler.OnLongPollDelete(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
307
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.InternalServerError));
337
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.InternalServerError));
363
return ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted);
398
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
HttpConnectionTests.cs (1)
130
testHttpHandler.OnNegotiate((request, cancellationToken) => ResponseUtils.
CreateResponse
(HttpStatusCode.BadGateway));
HttpConnectionTests.Negotiate.cs (21)
71
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
72
testHttpHandler.OnLongPollDelete(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
112
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
113
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
149
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
150
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
188
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
189
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
228
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
229
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
283
token.Register(() => tcs.TrySetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent)));
288
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
346
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
360
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
383
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized));
387
token.Register(() => tcs.TrySetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent)));
392
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
452
token.Register(() => tcs.TrySetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent)));
457
testHttpHandler.OnLongPollDelete((token) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
484
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
533
testHttpHandler.OnLongPoll(cancellationToken => ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
HttpConnectionTests.Transport.cs (18)
56
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
89
testHttpHandler.OnRequest((request, next, token) => Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent)));
138
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
178
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
204
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
211
testHttpHandler.OnSocketSend((_, __) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
237
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
250
longPollTcs.TrySetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent));
325
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
366
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
372
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
386
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized));
395
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.OK));
433
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
473
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
476
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
486
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized));
529
return ResponseUtils.
CreateResponse
(HttpStatusCode.Unauthorized);
LongPollingTransportTests.cs (31)
39
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
74
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
112
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
123
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
132
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
163
return ResponseUtils.
CreateResponse
(HttpStatusCode.InternalServerError);
194
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
196
return ResponseUtils.
CreateResponse
(HttpStatusCode.InternalServerError);
240
return ResponseUtils.
CreateResponse
(HttpStatusCode.NotFound);
247
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
251
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
286
return ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted);
288
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
290
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
292
return ResponseUtils.
CreateResponse
(HttpStatusCode.InternalServerError);
334
return ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted);
339
? ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent)
340
: ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
373
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
416
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
424
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
478
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
487
return ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted);
489
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
546
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
560
return ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted);
562
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
591
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
620
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
650
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
659
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
SendUtilsTests.cs (2)
26
responseTaskCompletionSource.SetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.OK));
30
responseTaskCompletionSource.SetResult(ResponseUtils.
CreateResponse
(HttpStatusCode.BadRequest));
ServerSentEventsTransportTests.cs (1)
200
return ResponseUtils.
CreateResponse
(System.Net.HttpStatusCode.InternalServerError);
TestHttpMessageHandler.cs (4)
56
return ResponseUtils.
CreateResponse
(HttpStatusCode.OK);
108
testHttpMessageHandler.OnSocketSend((_, __) => ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));
119
return ResponseUtils.
CreateResponse
(HttpStatusCode.NoContent);
126
return Task.FromResult(ResponseUtils.
CreateResponse
(HttpStatusCode.Accepted));