From 5733659216e980dac5c9f149ab0805cbe890f4ae Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 7 Jul 2026 10:00:31 +0100 Subject: [PATCH] Add MerchantReportingId to MerchantResponse and tests Included MerchantReportingId in MerchantResponse construction and updated related tests to validate its presence and value. Updated test data to provide MerchantReportingId for consistency. --- .../TransactionProcessorACLApplicationServiceTests.cs | 1 + .../Services/ResponseFactory.cs | 1 + TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs | 1 + TransactionProcessorACL.Testing/TestData.cs | 6 +++--- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACLApplicationServiceTests.cs b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACLApplicationServiceTests.cs index 6879c52..21408de 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACLApplicationServiceTests.cs +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACLApplicationServiceTests.cs @@ -495,6 +495,7 @@ public async Task TransactionProcessorACLApplicationService_GetMerchant_Merchant merchantResponse.IsSuccess.ShouldBeTrue(); merchantResponse.Data.ShouldNotBeNull(); merchantResponse.Data.MerchantId.ShouldBe(TestData.MerchantId); + merchantResponse.Data.MerchantReportingId.ShouldBe(TestData.MerchantReportingId); merchantResponse.Data.Addresses.Count.ShouldBe(1); merchantResponse.Data.Addresses[0].AddressLine1.ShouldBe(TestData.AddressLine1); merchantResponse.Data.Addresses[0].Town.ShouldBe(TestData.Town); diff --git a/TransactionProcessorACL.BusinessLogic/Services/ResponseFactory.cs b/TransactionProcessorACL.BusinessLogic/Services/ResponseFactory.cs index b26405d..74ba1a8 100644 --- a/TransactionProcessorACL.BusinessLogic/Services/ResponseFactory.cs +++ b/TransactionProcessorACL.BusinessLogic/Services/ResponseFactory.cs @@ -14,6 +14,7 @@ public static class ResponseFactory public static MerchantResponse Build(TransactionProcessor.DataTransferObjects.Responses.Merchant.MerchantResponse merchant) { MerchantResponse merchantResponse = new() { MerchantId = merchant.MerchantId, + MerchantReportingId = merchant.MerchantReportingId, EstateId = merchant.EstateId, MerchantName = merchant.MerchantName, EstateReportingId = merchant.EstateReportingId, diff --git a/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs b/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs index 5a72b25..1720dfb 100644 --- a/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs +++ b/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs @@ -188,6 +188,7 @@ public async Task WhenIGetTheMerchantInformationForMerchantForEstateTheResponseS MerchantResponse merchantResponse = StringSerialiser.Deserialise(responseContent, new SerialiserOptions(SerialiserPropertyFormat.SnakeCase)); merchantResponse.ShouldNotBeNull(); merchantResponse.MerchantId.ShouldBe(merchantId); + merchantResponse.MerchantReportingId.ShouldNotBe(0); merchantResponse.MerchantName.ShouldBe(expectedMerchantResponse.MerchantName); merchantResponse.Addresses.ShouldNotBeNull(); merchantResponse.Addresses.Count.ShouldBe(1); diff --git a/TransactionProcessorACL.Testing/TestData.cs b/TransactionProcessorACL.Testing/TestData.cs index d3c198d..6098fea 100644 --- a/TransactionProcessorACL.Testing/TestData.cs +++ b/TransactionProcessorACL.Testing/TestData.cs @@ -50,11 +50,10 @@ public class TestData TransactionNumber = TestData.TransactionNumber }; - /// - /// The merchant identifier - /// public static Guid MerchantId = Guid.Parse("1C8354B7-B97A-46EA-9AD1-C43F33F7E3C3"); + public static Int32 MerchantReportingId = 1; + public static RequestAuditContext RequestAuditContext = new RequestAuditContext( RequestId: "req-123", TraceId: "trace-123", @@ -379,6 +378,7 @@ public static TransactionProcessor.DataTransferObjects.Responses.Merchant.Mercha Contacts = new (){ Contact }, + MerchantReportingId = MerchantReportingId }; public static List MerchantContractResponses(TransactionProcessor.DataTransferObjects.Responses.Contract.ProductType productType) => new() {