Provides extensions for action results.
More...
|
static HttpResponse | ResolveResponse (this IActionResult actionResult) |
| Resolve the HttpResponse that would be generated for the provided action result (synchronous overload)
|
static async Task< HttpResponse > | ResolveResponseAsync (this IActionResult actionResult) |
| Resolve the HttpResponse that would be generated for the provided action result.
|
static T | FetchModel< T > (this IActionResult actionResult) |
| Attempts to fetch the model off of the ActionResult. This requires that you know the model type, otherwise it will fail.
|
static HttpStatusCode | StatusCode (this IActionResult actionResult) |
| Verifies the status code on the action result.
|
Provides extensions for action results.
◆ FetchModel< T >()
T PeanutButter.TestUtils.AspNetCore.ActionResultExtensions.FetchModel< T > |
( |
this IActionResult | actionResult | ) |
|
|
static |
Attempts to fetch the model off of the ActionResult. This requires that you know the model type, otherwise it will fail.
- Parameters
-
- Template Parameters
-
- Returns
◆ ResolveResponse()
HttpResponse PeanutButter.TestUtils.AspNetCore.ActionResultExtensions.ResolveResponse |
( |
this IActionResult | actionResult | ) |
|
|
static |
Resolve the HttpResponse that would be generated for the provided action result (synchronous overload)
- Parameters
-
- Returns
◆ ResolveResponseAsync()
async Task< HttpResponse > PeanutButter.TestUtils.AspNetCore.ActionResultExtensions.ResolveResponseAsync |
( |
this IActionResult | actionResult | ) |
|
|
static |
Resolve the HttpResponse that would be generated for the provided action result.
- Parameters
-
- Returns
◆ StatusCode()
HttpStatusCode PeanutButter.TestUtils.AspNetCore.ActionResultExtensions.StatusCode |
( |
this IActionResult | actionResult | ) |
|
|
static |
Verifies the status code on the action result.
- Parameters
-
- Returns
- Exceptions
-
NotImplementedException | |
InvalidOperationException | |
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.AspNetCore/ActionResultExtensions.cs