Provides a fake http context.
More...
|
override void | Abort () |
void | SetWebSockets (WebSocketManager webSocketManager) |
| Sets the websockets manager.
|
void | SetFeatures (IFeatureCollection features) |
| Sets the features.
|
void | SetRequestAccessor (Func< HttpRequest > accessor) |
| Sets the request accessor.
|
void | SetResponseAccessor (Func< HttpResponse > accessor) |
| Sets the response accessor.
|
void | SetConnection (ConnectionInfo connection) |
| Sets the connection info.
|
|
bool | Aborted [get] |
| Indicates if the request has been aborted.
|
override IFeatureCollection | Features [get] |
override HttpRequest | Request [get] |
override HttpResponse | Response [get] |
override ConnectionInfo | Connection [get] |
override WebSocketManager | WebSockets [get] |
override ClaimsPrincipal | User [get, set] |
override IDictionary< object, object > | Items [get, set] |
override IServiceProvider | RequestServices [get, set] |
override CancellationToken | RequestAborted = new() [get, set] |
override string | TraceIdentifier [get, set] |
override ISession | Session = Guid.NewGuid().ToString() [get, set] |
Provides a fake http context.
◆ SetConnection()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeHttpContext.SetConnection |
( |
ConnectionInfo | connection | ) |
|
Sets the connection info.
- Parameters
-
◆ SetFeatures()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeHttpContext.SetFeatures |
( |
IFeatureCollection | features | ) |
|
Sets the features.
- Parameters
-
◆ SetRequestAccessor()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeHttpContext.SetRequestAccessor |
( |
Func< HttpRequest > | accessor | ) |
|
Sets the request accessor.
- Parameters
-
◆ SetResponseAccessor()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeHttpContext.SetResponseAccessor |
( |
Func< HttpResponse > | accessor | ) |
|
Sets the response accessor.
- Parameters
-
◆ SetWebSockets()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeHttpContext.SetWebSockets |
( |
WebSocketManager | webSocketManager | ) |
|
Sets the websockets manager.
- Parameters
-
◆ RequestServices
override IServiceProvider PeanutButter.TestUtils.AspNetCore.Fakes.FakeHttpContext.RequestServices |
|
getset |
Initial value:= new DefaultDictionary<object, object>(
DefaultDictionaryFlags.ReportMissingKeys
)
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.AspNetCore/Fakes/FakeHttpContext.cs