Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@carlosbrunetti carlosbrunetti released this 28 Dec 16:34
· 42 commits to main since this release
eed8f12

Release Notes for feature/added-result-methods Branch

New Features

  • Added ToResult Method:

    • Converts the RespifyResponse object to an ObjectResult.
    • Sets the StatusCode of the ObjectResult to match the RespifyResponse's StatusCode.
  • Added ToResultAsync Method:

    • Asynchronously converts the RespifyResponse object to an ObjectResult.
    • Uses Task.FromResult to create the ObjectResult with the same StatusCode as the RespifyResponse.

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 a RespifyResponse object to an ObjectResult with the appropriate StatusCode.
  • Test for ToResultAsync Method:

    • Verifies that the ToResultAsync method correctly converts a RespifyResponse object to an ObjectResult asynchronously with the appropriate StatusCode.

Class Property Changes

  • RespifyResponse Class:
    • Added ToResult method.
    • Added ToResultAsync method.