feat(adm-009): TipoDeIvaRepository + IngresosBrutosRepository Dapper implementations + DI registration

This commit is contained in:
2026-04-17 18:23:10 -03:00
parent 8e2d6bfb14
commit 83dd680fa3
5 changed files with 655 additions and 6 deletions

View File

@@ -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()