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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user