PeanutButter
|
Builds a RequestDelegateTestArena, which makes testing middleware a lot easier. More...
Public Member Functions | |
RequestDelegateTestArena | Build () |
Build the arena. | |
RequestDelegateTestArenaBuilder | ForOptionsRequest () |
Generate the request delegate arena for a random OPTIONS request. | |
RequestDelegateTestArenaBuilder | WithContextMutator (Action< HttpContextBuilder > mutator) |
Fluent mechanism for adding an http context mutation. | |
RequestDelegateTestArenaBuilder | WithRequestMutator (Action< HttpRequest > mutator) |
Add a mutation on the request for the context. | |
RequestDelegateTestArenaBuilder | WithResponseMutator (Action< HttpResponse > mutator) |
Add a mutation on the response for the context. | |
RequestDelegateTestArenaBuilder | WithResponse (HttpResponse response) |
Set the entire response for the context. | |
RequestDelegateTestArenaBuilder | WithRequest (HttpRequest request) |
Set the entire request for the context. | |
RequestDelegateTestArenaBuilder | WithDelegateLogic (Action< HttpContext > logic) |
Fluent mechanism for setting the delegate logic (overrides any existing logic) | |
RequestDelegateTestArenaBuilder | WithContext (HttpContext context) |
Fluent mechanism for setting the HttpContext. | |
RequestDelegateTestArenaBuilder | WithOriginHeader () |
Sets the origin header on the request to be the root of the request url. | |
RequestDelegateTestArenaBuilder | WithOriginHeader (string origin) |
Sets the Origin header on the request to the provided value. |
Static Public Member Functions | |
static RequestDelegateTestArenaBuilder | Create () |
Create the arena for fluent syntax usage. | |
static RequestDelegateTestArena | BuildDefault () |
Builds the default RequestDelegateTestArena. |
Builds a RequestDelegateTestArena, which makes testing middleware a lot easier.
RequestDelegateTestArena PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.Build | ( | ) |
Build the arena.
NotImplementedException |
|
static |
Builds the default RequestDelegateTestArena.
|
static |
Create the arena for fluent syntax usage.
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.ForOptionsRequest | ( | ) |
Generate the request delegate arena for a random OPTIONS request.
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithContext | ( | HttpContext | context | ) |
Fluent mechanism for setting the HttpContext.
context |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithContextMutator | ( | Action< HttpContextBuilder > | mutator | ) |
Fluent mechanism for adding an http context mutation.
mutator |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithDelegateLogic | ( | Action< HttpContext > | logic | ) |
Fluent mechanism for setting the delegate logic (overrides any existing logic)
logic |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithOriginHeader | ( | ) |
Sets the origin header on the request to be the root of the request url.
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithOriginHeader | ( | string | origin | ) |
Sets the Origin header on the request to the provided value.
origin |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithRequest | ( | HttpRequest | request | ) |
Set the entire request for the context.
request |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithRequestMutator | ( | Action< HttpRequest > | mutator | ) |
Add a mutation on the request for the context.
mutator |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithResponse | ( | HttpResponse | response | ) |
Set the entire response for the context.
response |
RequestDelegateTestArenaBuilder PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArenaBuilder.WithResponseMutator | ( | Action< HttpResponse > | mutator | ) |
Add a mutation on the response for the context.
mutator |