Closed italopessoa closed 1 month ago
Recent updates in the project primarily focus on refining the database schema, enhancing exception handling, and modifying service registrations. There's an addition of a new testing suite for the ProductRepositoryDapper
class, ensuring robustness in product management functionalities. The changes collectively aim to improve data handling, resource cleanup, and testing efficacy across the system.
File Path | Change Summary |
---|---|
.docker/setup.sql |
Renamed table Product to Products . |
src/.../Controllers/ProductController.cs |
Enhanced exception handling in Delete method by explicitly catching exceptions. |
src/.../ServiceCollectionExtensions.cs |
Commented out registration of IProductRepository using InMemoryProductRepository . |
src/.../Repository/OrderRepositoryDapper.cs |
Added a finally block to ensure _dbConnection is closed after transactions. |
src/.../Repository/ProductRepositoryDapper.cs |
Added multiple new methods and a constructor to ProductRepositoryDapper for improved product management. |
tests/.../Repository/ProductRepositoryDapperTest.cs |
Introduced a new test class for testing the CreateAsync method in ProductRepositoryDapper . |
build success (10)
src/FIAP.TechChallenge.ByteMeBurger.Infrastructure/Repository/OrderRepositoryDapper.cs: [warning] 41-41: The variable 'e' is declared but never used
tests/FIAP.TechChallenge.ByteMeBurger.Infrastructure.Test/Repository/ProductRepositoryDapperTest.cs (1)
Pattern `**/*.cs`: Validate all files and structures against Domain Driven Design principles and Ports & Adapters architecture pattern.src/FIAP.TechChallenge.ByteMeBurger.Infrastructure/Repository/ProductRepositoryDapper.cs (1)
Pattern `**/*.cs`: Validate all files and structures against Domain Driven Design principles and Ports & Adapters architecture pattern.src/FIAP.TechChallenge.ByteMeBurger.Infrastructure/Repository/OrderRepositoryDapper.cs (1)
Pattern `**/*.cs`: Validate all files and structures against Domain Driven Design principles and Ports & Adapters architecture pattern.src/FIAP.TechChallenge.ByteMeBurger.Api/Controllers/ProductController.cs (1)
Pattern `**/*.cs`: Validate all files and structures against Domain Driven Design principles and Ports & Adapters architecture pattern.
tests/FIAP.TechChallenge.ByteMeBurger.Infrastructure.Test/Repository/ProductRepositoryDapperTest.cs (1)
`17-23`: Setup for unit tests looks appropriate and well-structured.src/FIAP.TechChallenge.ByteMeBurger.Infrastructure/Repository/ProductRepositoryDapper.cs (1)
`24-37`: The `CreateAsync` method is correctly implemented with parameterized SQL queries to prevent SQL injection.src/FIAP.TechChallenge.ByteMeBurger.Infrastructure/Repository/OrderRepositoryDapper.cs (1)
`46-49`: Proper use of transaction management and resource cleanup in the `finally` block enhances reliability.
3