carlosbrunetti
released this
28 Dec 16:34
·
42 commits
to main
since this release
Release Notes for feature/added-result-methods
Branch
New Features
-
Added
ToResult
Method:- Converts the
RespifyResponse
object to anObjectResult
. - Sets the
StatusCode
of theObjectResult
to match theRespifyResponse
'sStatusCode
.
- Converts the
-
Added
ToResultAsync
Method:- Asynchronously converts the
RespifyResponse
object to anObjectResult
. - Uses
Task.FromResult
to create theObjectResult
with the sameStatusCode
as theRespifyResponse
.
- Asynchronously converts the
These changes enhance the RespifyResponse
class by providing synchronous and asynchronous methods to convert the response object to an ObjectResult
, facilitating easier integration with ASP.NET Core MVC.
Tests
-
Test for
ToResult
Method:- Verifies that the
ToResult
method correctly converts aRespifyResponse
object to anObjectResult
with the appropriateStatusCode
.
- Verifies that the
-
Test for
ToResultAsync
Method:- Verifies that the
ToResultAsync
method correctly converts aRespifyResponse
object to anObjectResult
asynchronously with the appropriateStatusCode
.
- Verifies that the
Class Property Changes
RespifyResponse
Class:- Added
ToResult
method. - Added
ToResultAsync
method.
- Added