Three bugs surfaced while user smoke-testing Reactivate:
1. ReactivateAsync opened a SECOND connection for GetByIdAsync after the SP
call, inside the ambient TransactionScope. This promoted the tx to DTC
(distributed) which requires MSDTC — typically not enabled on dev/prod
servers. The API returned an opaque 500. Fix: run the post-SP SELECT on
the SAME connection (local tx stays lightweight / LTM).
2. Agent 1's V023 test refactor wrote 'INSERT INTO dbo.ProductType (Nombre,
Codigo, Activo)' in 2 test files — but dbo.ProductType has no 'Codigo' or
'Activo' columns (schema is Nombre + IsActive + flags + multimedia limits).
Fix: use '(Nombre, HasDuration, RequiresText, RequiresCategory, IsBundle,
AllowImages)' matching the other test files (ProductQueryRepositoryTests,
ProductRepositoryTests, ProductPriceRepositoryIntegrationTests).
3. SqlTestFixture.EnsureV021SchemaAsync unconditionally ALTERed the V021-era
SPs with '@MedioId' body. On second fixture run after V023 had already
refactored the table, ALTER PROCEDURE body referenced a MedioId column
that no longer existed — 'Invalid column name MedioId'. Fix: guard the
V021 SP ALTERs + seedV022 behind 'MedioId column exists' check. If V023
already dropped MedioId, skip V021 re-install; EnsureV023SchemaAsync
still recreates SPs with @ProductTypeId.
4. PricingExceptionTests still used 'medioId:' named-arg + '.MedioId' — Agent 2
renamed the exception property but not these 6 test references.
Tests: 1297/1297 Application.Tests green.
Part A — MedioId → ProductTypeId rename across all C# layers:
Domain, Application, Infrastructure, API, all test projects.
Solution was non-compilable after BD refactor (5c1675e); now compiles clean (0 errors).
Part B — PATCH /api/v1/admin/chargeable-chars/{id}/reactivate:
ReactivateChargeableCharConfigCommand/Handler, SP guard maps 50410/50411/50412
→ ChargeableCharConfigReactivationNotAllowedException(Reason) → HTTP 409.
Part C — DELETE /api/v1/admin/chargeable-chars/{id}:
DeleteChargeableCharConfigCommand/Handler, physical DELETE on SYSTEM_VERSIONED table.
KeyNotFoundException → 404 via ExceptionFilter.
Tests: +30 unit tests (TDD RED→GREEN). All 1266 unit tests pass.
Fix all test compilation errors caused by T400.10/T400.20/T400.30:
- Handler constructors: add TimeProvider.System as last argument
- Domain mutator calls: add DateTime.UtcNow as explicit 'now' argument
- AuditLogger/SecurityEventLogger Build() helpers: add TimeProvider.System
- JwtService test constructors: add TimeProvider.System
Cat2 coverage already present in TimeProviderArgentinaExtensionsTests.cs:
FakeTimeProvider proves GetArgentinaToday() returns ART civil date, not UTC.
Eliminar SecuenciaComprobanteTests, ReservarNumeroCommandHandlerTests,
GetProximoNumeroQueryHandlerTests y 7 tests de integración en
PuntosDeVentaControllerTests (reserva/proximo/concurrencia/secuencialidad).
SqlTestFixture ahora limpia SecuenciaComprobante+SP si existen (drops idempotentes)
y solo crea PuntoDeVenta + temporal table.