Enhance IRepository and update DbRepositoryTests

- Added ReadAsync method to IRepository for user retrieval.
- Introduced _userRepo field in DbRepositoryTests for better clarity.
- Modified Setup method to initialize _userRepo from the service provider.
- Updated CreateAsync_ShouldNotThrow to use _userRepo.
- Added ReadAsync_ShouldReturnCreated test for user retrieval validation.
This commit is contained in:
Developer 02
2025-04-17 16:00:59 +02:00
parent 06df97597e
commit 9376fcff86
2 changed files with 24 additions and 4 deletions

View File

@@ -17,4 +17,5 @@ public interface IRepository<TEntity>
public Task UpdateAsync<TDto>(TDto dto, Expression<Func<TEntity, bool>> expression, CancellationToken ct = default);
public Task DeleteAsync<TDto>(Expression<Func<TEntity, bool>> expression, CancellationToken ct = default);
Task ReadAsync(Core.Tests.Mock.User user);
}