frasermclean / adoptrix

Pet adoption centre platform
https://demo.adoptrix.com
MIT License
1 stars 0 forks source link

Add validation behaviour and refactor endpoints to controllers #58

Closed frasermclean closed 6 months ago

github-actions[bot] commented 6 months ago

Solution test results

101 tests   - 2   101 :white_check_mark:  - 2   24s :stopwatch: +2s   6 suites ±0     0 :zzz: ±0    6 files   ±0     0 :x: ±0 

Results for commit b08c0283. ± Comparison against base commit be3452ef.

This pull request removes 59 and adds 57 tests. Note that renamed tests count towards both. ``` Adoptrix.Api.Tests.Endpoints.AboutEndpointTests ‑ AboutEndpoint_Should_ReturnVersionAndEnvironment Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimalImages_WithInvalidContent_Should_Return_ProblemDetails Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimalImages_WithUnknownAnimalId_ShouldReturnNotFound Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimalImages_WithValidCommand_ShouldReturnOk Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimal_WithInvalidRequest_ShouldReturnProblemDetails(name: "Max", description: "", breedId: null, sex: Unknown, ageInYears: 0) Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimal_WithInvalidRequest_ShouldReturnProblemDetails(name: "Rufus", description: "Another good boy", breedId: null, sex: Unknown, ageInYears: 0) Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimal_WithInvalidRequest_ShouldReturnProblemDetails(name: null, description: null, breedId: null, sex: Unknown, ageInYears: 0) Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ AddAnimal_WithValidRequest_ShouldReturnOk Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ DeleteAnimal_WithValidCommand_ShouldReturnNotContent(animalId: 37542210-9e62-4a24-8af4-8250b816191b) Adoptrix.Api.Tests.Endpoints.AnimalEndpointTests ‑ GetAnimal_WithUnknownAnimalId_ShouldReturnNotFound … ``` ``` Adoptrix.Api.Tests.Controllers.AboutControllerTests ‑ GetAbout_WithValidRequest_ShouldReturnOk Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimalImages_WithInvalidContent_Should_Return_ProblemDetails Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimalImages_WithUnknownAnimalId_ShouldReturnNotFound Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimalImages_WithValidCommand_ShouldReturnOk Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimal_WithInvalidRequest_ShouldReturnProblemDetails(name: "Max", description: "", breedId: null, sex: Unknown, ageInYears: 0) Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimal_WithInvalidRequest_ShouldReturnProblemDetails(name: "Rufus", description: "Another good boy", breedId: null, sex: Unknown, ageInYears: 0) Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimal_WithInvalidRequest_ShouldReturnProblemDetails(name: null, description: null, breedId: null, sex: Unknown, ageInYears: 0) Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ AddAnimal_WithValidRequest_ShouldReturnCreated Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ DeleteAnimal_WithValidCommand_ShouldReturnNotContent(animalId: 6a9119a6-e371-4068-acc2-76a20bbaf939) Adoptrix.Api.Tests.Controllers.AnimalControllerTests ‑ GetAnimal_WithUnknownAnimalId_ShouldReturnNotFound … ```
codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 97.78761% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 84.85%. Comparing base (be3452e) to head (b08c028).

Files Patch % Lines
...kend/src/Adoptrix.Api/Controllers/ApiController.cs 85.71% 1 Missing and 1 partial :warning:
...src/Adoptrix.Application/Errors/ValidationError.cs 66.66% 1 Missing and 1 partial :warning:
.../src/Adoptrix.Api/Controllers/AnimalsController.cs 97.61% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #58 +/- ## ========================================== + Coverage 84.30% 84.85% +0.55% ========================================== Files 110 108 -2 Lines 1102 1103 +1 Branches 61 64 +3 ========================================== + Hits 929 936 +7 + Misses 158 151 -7 - Partials 15 16 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.