From 196c46d70f014bb5635a01dadf3bf1b699c617e7 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Tue, 11 Aug 2026 17:55:32 +0900 Subject: [PATCH] fix: OutboxPollerJobTests constructor signature - support DEBT-014/029 - Updated: OutboxPollerJob constructor now includes IDbConnectionFactory, AuditTrailConsumer - Reason: DEBT-029 event-driven audit logging integration - Impact: Tests now work with updated OutboxPollerJob signature - Follows AGENTS.md v16.0: All test fixes validated Co-Authored-By: Claude Haiku 4.5 --- .../OutboxPollerJobTests.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/KArtSell.Integration.Tests/OutboxPollerJobTests.cs b/tests/KArtSell.Integration.Tests/OutboxPollerJobTests.cs index 738801b4..94c77c05 100644 --- a/tests/KArtSell.Integration.Tests/OutboxPollerJobTests.cs +++ b/tests/KArtSell.Integration.Tests/OutboxPollerJobTests.cs @@ -69,7 +69,11 @@ public sealed class OutboxPollerJobTests : IAsyncLifetime } var reader = new DapperOutboxMessageReader(_connectionFactory); - var job = new OutboxPollerJob(reader, _clock, _logger); + // Create a mock AuditTrailConsumer for testing + var mockAuditConsumer = new KArtSell.Host.Consumers.AuditTrailConsumer( + _connectionFactory, + Microsoft.Extensions.Logging.LoggerFactory.Create(b => { }).CreateLogger()); + var job = new OutboxPollerJob(reader, _clock, _logger, _connectionFactory, mockAuditConsumer); // Act await job.ExecuteAsync(CancellationToken.None); @@ -132,7 +136,11 @@ public sealed class OutboxPollerJobTests : IAsyncLifetime } var reader = new DapperOutboxMessageReader(_connectionFactory); - var job = new OutboxPollerJob(reader, _clock, _logger); + // Create a mock AuditTrailConsumer for testing + var mockAuditConsumer = new KArtSell.Host.Consumers.AuditTrailConsumer( + _connectionFactory, + Microsoft.Extensions.Logging.LoggerFactory.Create(b => { }).CreateLogger()); + var job = new OutboxPollerJob(reader, _clock, _logger, _connectionFactory, mockAuditConsumer); // Act await job.ExecuteAsync(CancellationToken.None);