test(udt-011): T400.40 — update tests for TimeProvider injection and explicit now params

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.
This commit is contained in:
2026-04-18 10:12:32 -03:00
parent a9838427a4
commit 9bc191c3ae
35 changed files with 79 additions and 75 deletions

View File

@@ -44,7 +44,7 @@ public class LoginCommandHandlerTests
_handler = new LoginCommandHandler(
_repository, _hasher, _jwtService,
_refreshRepo, _refreshGenerator, _clientCtx, _authOptions,
_rolPermisoRepo, _security, _logger);
_rolPermisoRepo, _security, _logger, TimeProvider.System);
}
// Scenario: valid credentials → returns token response with usuario populated

View File

@@ -13,7 +13,7 @@ public class LogoutCommandHandlerTests
public LogoutCommandHandlerTests()
{
_handler = new LogoutCommandHandler(_refreshRepo, _security);
_handler = new LogoutCommandHandler(_refreshRepo, _security, TimeProvider.System);
}
[Fact]

View File

@@ -36,7 +36,8 @@ public class RefreshCommandHandlerTests
_generator.Generate().Returns("new_raw_token_value_xyz");
_handler = new RefreshCommandHandler(
_refreshRepo, _usuarioRepo, _jwtService, _generator, _clientCtx, _authOptions, _security);
_refreshRepo, _usuarioRepo, _jwtService, _generator, _clientCtx, _authOptions, _security,
TimeProvider.System);
}
// Helper: build an active stored RefreshToken with a matching principal