feat(adm-009): TipoDeIvaRepository + IngresosBrutosRepository Dapper implementations + DI registration
This commit is contained in:
@@ -24,13 +24,21 @@ public class IngresosBrutosRepositoryTests : IAsyncLifetime
|
||||
private SqlConnection _connection = null!;
|
||||
private IIngresosBrutosRepository _repo = null!;
|
||||
|
||||
private static readonly int _runBase;
|
||||
|
||||
static IngresosBrutosRepositoryTests()
|
||||
{
|
||||
var bytes = Guid.NewGuid().ToByteArray();
|
||||
_runBase = (int)(BitConverter.ToUInt32(bytes, 0) % 500_000u);
|
||||
}
|
||||
|
||||
private static int _testCounter = 0;
|
||||
|
||||
private static DateOnly NextUniqueDate()
|
||||
{
|
||||
var counter = Interlocked.Increment(ref _testCounter);
|
||||
// Start at 2091-01-01 to avoid clashing with TipoDeIvaRepositoryTests (2090-01-01)
|
||||
return new DateOnly(2091, 1, 1).AddDays(counter);
|
||||
// Base year 2091 (different from TipoDeIvaRepositoryTests which uses 2090).
|
||||
return new DateOnly(2091, 1, 1).AddDays(_runBase + counter);
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
|
||||
Reference in New Issue
Block a user