|
PeanutButter
|
Sets up the useful bits for testing an asp.net middleware class - use this to easily set up the context and next parameters for InvokeAsync. More...
Public Member Functions | |
| RequestDelegateTestArena () | |
| Construct a test arena with no custom logic in the delegate and no mutations to the http context. | |
| RequestDelegateTestArena (Action< HttpContext > delegateLogic) | |
| Create the test arena with custom delegate logic and no http context mutations. | |
| RequestDelegateTestArena (Func< HttpContext, Task > delegateLogic) | |
| Create the test arena with custom delegate logic and no http context mutations. | |
| RequestDelegateTestArena (Action< HttpContext > logic, Action< HttpContextBuilder > httpContextMutator) | |
| Constructs a RequestDelegateTestArena with the provided synchronous http logic and context mutator. | |
| RequestDelegateTestArena (Func< HttpContext, Task > logic, Action< HttpContextBuilder > httpContextMutator) | |
| Create the test arena with the provided delegate logic and http context mutations. | |
| RequestDelegateTestArena (Func< HttpContext, Task > logic, HttpContext httpContext) | |
| Construct with the provided logic and context. | |
| void | Deconstruct (out HttpContext ctx, out RequestDelegate next) |
| Deconstruct into a tuple, eg var (ctx, next) = new RequestDelegateTestArena();. | |
Static Public Attributes | |
| const string | METADATA_KEY_CALL_ARGS = "__callargs__" |
| The key used to hold the call history for the delegate in PB metadata. | |
Properties | |
| RequestDelegate | Delegate [get] |
| The delegate that is generated for your test. | |
| HttpContext | HttpContext [get, set] |
| The HttpContext (or use this to set your own) | |
Sets up the useful bits for testing an asp.net middleware class - use this to easily set up the context and next parameters for InvokeAsync.
| PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArena.RequestDelegateTestArena | ( | Action< HttpContext > | delegateLogic | ) |
Create the test arena with custom delegate logic and no http context mutations.
| delegateLogic |
| PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArena.RequestDelegateTestArena | ( | Func< HttpContext, Task > | delegateLogic | ) |
Create the test arena with custom delegate logic and no http context mutations.
| delegateLogic |
| PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArena.RequestDelegateTestArena | ( | Action< HttpContext > | logic, |
| Action< HttpContextBuilder > | httpContextMutator ) |
Constructs a RequestDelegateTestArena with the provided synchronous http logic and context mutator.
| logic | |
| httpContextMutator |
| PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArena.RequestDelegateTestArena | ( | Func< HttpContext, Task > | logic, |
| Action< HttpContextBuilder > | httpContextMutator ) |
Create the test arena with the provided delegate logic and http context mutations.
| logic | |
| httpContextMutator |
| PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArena.RequestDelegateTestArena | ( | Func< HttpContext, Task > | logic, |
| HttpContext | httpContext ) |
Construct with the provided logic and context.
| logic | |
| httpContext |
| NotImplementedException |
| void PeanutButter.TestUtils.AspNetCore.Utils.RequestDelegateTestArena.Deconstruct | ( | out HttpContext | ctx, |
| out RequestDelegate | next ) |
Deconstruct into a tuple, eg var (ctx, next) = new RequestDelegateTestArena();.
| ctx | |
| next |