From 37f77633e754e8830acf726835484e65421ebaa7 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 13:50:17 +0100 Subject: [PATCH 1/7] add tests for agency banking to specflow --- .../Common/DockerHelper.cs | 1 - .../Common/Setup.cs | 2 +- .../SaleTransaction/SalesTransaction.feature | 143 ++- .../SalesTransaction.feature.cs | 819 +++++++++++++++--- .../Shared/SharedSteps.cs | 91 +- 5 files changed, 898 insertions(+), 158 deletions(-) diff --git a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs index 8fb362d..6f62b65 100644 --- a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs @@ -73,7 +73,6 @@ public override DotNet.Testcontainers.Builders.ContainerBuilder SetupEstateRepor return base.SetupEstateReportingContainer(); } - public override async Task CreateSubscriptions(){ List<(String streamName, String groupName, Int32 maxRetries)> subscriptions = new List<(String streamName, String groupName, Int32 maxRetries)>(); subscriptions.AddRange(MessagingService.IntegrationTesting.Helpers.SubscriptionsHelper.GetSubscriptions()); diff --git a/TransactionProcessorACL.IntegrationTests/Common/Setup.cs b/TransactionProcessorACL.IntegrationTests/Common/Setup.cs index bc3dee2..0abdafd 100644 --- a/TransactionProcessorACL.IntegrationTests/Common/Setup.cs +++ b/TransactionProcessorACL.IntegrationTests/Common/Setup.cs @@ -26,7 +26,7 @@ public class Setup public static async Task GlobalSetup(DockerHelper dockerHelper) { - ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(1); + ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(5); } } } diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature index e289c03..6266406 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature @@ -26,43 +26,109 @@ Background: | ClientId | | serviceClient | + Given the following bills are available at the PataPawa PostPaid Host + | AccountNumber | AccountName | DueDate | Amount | + | 12345678 | Test Account 1 | Today | 100.00 | + + Given the following users are available at the PataPawa PrePay Host + | Username | Password | + | operatora | 1234567898 | + + Given the following meters are available at the PataPawa PrePay Host + | MeterNumber | CustomerName | + | 00000001 | Customer 1 | + | 00000002 | Customer 2 | + | 00000003 | Customer 3 | + + Given I initialise the Agency Banking Host + + Given I create the following accounts + | Type | Code | Name | Currency | + | LIABILITY | 200100 | Agent Float GL | KES | + | LIABILITY | 200200 | Settlement Suspense GL | KES | + | EXPENSE | 400100 | Agent Commission GL | KES | + | LIABILITY | 200300 | Reversal GL | KES | + | INCOME | 400200 | Fee Income GL | KES | + + Given I create the settlement account + | AccountNumber | BankCode | Currency | Name | + | 999000001 | 001 | KES | Main Settlement Account | + + Given I create the following customers + | CustomerId | FullName | PhoneNumber | NationalId | AccountNumber | + | CUST001 | Test Customer 1 | 0712345678 | 12345678 | 12345678 | + Given I have created the following estates | EstateName | | Test Estate 1 | | Test Estate 2 | Given I have created the following operators - | EstateName | OperatorName | RequireCustomMerchantNumber | RequireCustomTerminalNumber | - | Test Estate 1 | Safaricom | True | True | - | Test Estate 1 | Voucher | True | True | - | Test Estate 2 | Safaricom | True | True | - | Test Estate 2 | Voucher | True | True | + | EstateName | OperatorName | RequireCustomMerchantNumber | RequireCustomTerminalNumber | + | Test Estate 1 | Safaricom | True | True | + | Test Estate 1 | Voucher | True | True | + | Test Estate 1 | PataPawa PostPay | False | False | + | Test Estate 1 | PataPawa PrePay | False | False | + | Test Estate 1 | AgencyBanking | False | False | + | Test Estate 2 | Safaricom | True | True | + | Test Estate 2 | Voucher | True | True | + | Test Estate 2 | PataPawa PostPay | False | False | + | Test Estate 2 | PataPawa PrePay | False | False | + | Test Estate 2 | AgencyBanking | False | False | And I have assigned the following operators to the estates | EstateName | OperatorName | | Test Estate 1 | Safaricom | | Test Estate 1 | Voucher | + | Test Estate 1 | PataPawa PostPay | + | Test Estate 1 | PataPawa PrePay | + | Test Estate 1 | AgencyBanking | | Test Estate 2 | Safaricom | | Test Estate 2 | Voucher | + | Test Estate 2 | PataPawa PostPay | + | Test Estate 2 | PataPawa PrePay | + | Test Estate 2 | AgencyBanking | Given I create a contract with the following values | EstateName | OperatorName | ContractDescription | | Test Estate 1 | Safaricom | Safaricom Contract | | Test Estate 1 | Voucher | Hospital 1 Contract | + | Test Estate 1 | PataPawa PostPay | PataPawa PostPay Contract | + | Test Estate 1 | PataPawa PrePay | PataPawa PrePay Contract | + | Test Estate 1 | AgencyBanking | AgencyBanking Contract | | Test Estate 2 | Safaricom | Safaricom Contract | | Test Estate 2 | Voucher | Hospital 1 Contract | + | Test Estate 2 | PataPawa PostPay | PataPawa PostPay Contract | + | Test Estate 2 | PataPawa PrePay | PataPawa PrePay Contract | + | Test Estate 2 | AgencyBanking | AgencyBanking Contract | When I create the following Products - | EstateName | OperatorName | ContractDescription | ProductName | DisplayText | Value | ProductType | - | Test Estate 1 | Safaricom | Safaricom Contract | Variable Topup | Custom | | MobileTopup | - | Test Estate 1 | Voucher | Hospital 1 Contract | 10 KES | 10 KES | | Voucher | - | Test Estate 2 | Safaricom | Safaricom Contract | Variable Topup | Custom | | MobileTopup | - | Test Estate 2 | Voucher | Hospital 1 Contract | 10 KES | 10 KES | | Voucher | + | EstateName | OperatorName | ContractDescription | ProductName | DisplayText | Value | ProductType | + | Test Estate 1 | Safaricom | Safaricom Contract | Variable Topup | Custom | | MobileTopup | + | Test Estate 1 | Voucher | Hospital 1 Contract | 10 KES | 10 KES | | Voucher | + | Test Estate 1 | PataPawa PostPay | PataPawa PostPay Contract | Post Pay Bill Pay | Bill Pay (Post) | | BillPayment | + | Test Estate 1 | PataPawa PrePay | PataPawa PrePay Contract | Pre Pay Bill Pay | Bill Pay (Pre) | | BillPayment | + | Test Estate 1 | AgencyBanking | AgencyBanking Contract | Balance Enquiry | Balance Enquiry | | MobileTopup | + | Test Estate 1 | AgencyBanking | AgencyBanking Contract | Deposit | Deposit | | MobileTopup | + | Test Estate 1 | AgencyBanking | AgencyBanking Contract | Withdrawal | Withdrawal | | MobileTopup | + | Test Estate 1 | AgencyBanking | AgencyBanking Contract | MiniStatement | Mini Statement | | MobileTopup | + | Test Estate 2 | Safaricom | Safaricom Contract | Variable Topup | Custom | | MobileTopup | + | Test Estate 2 | Voucher | Hospital 1 Contract | 10 KES | 10 KES | | Voucher | + | Test Estate 2 | PataPawa PostPay | PataPawa PostPay Contract | Post Pay Bill Pay | Bill Pay (Post) | | BillPayment | + | Test Estate 2 | PataPawa PrePay | PataPawa PrePay Contract | Pre Pay Bill Pay | Bill Pay (Pre) | | BillPayment | + | Test Estate 2 | AgencyBanking | AgencyBanking Contract | Balance Enquiry | Balance Enquiry | | MobileTopup | + | Test Estate 2 | AgencyBanking | AgencyBanking Contract | Deposit | Deposit | | MobileTopup | + | Test Estate 2 | AgencyBanking | AgencyBanking Contract | Withdrawal | Withdrawal | | MobileTopup | + | Test Estate 2 | AgencyBanking | AgencyBanking Contract | MiniStatement | Mini Statement | | MobileTopup | When I add the following Transaction Fees - | EstateName | OperatorName | ContractDescription | ProductName | CalculationType | FeeDescription | Value | - | Test Estate 1 | Safaricom | Safaricom Contract | Variable Topup | Fixed | Merchant Commission | 2.50 | - | Test Estate 2 | Safaricom | Safaricom Contract | Variable Topup | Percentage | Merchant Commission | 0.85 | + | EstateName | OperatorName | ContractDescription | ProductName | CalculationType | FeeDescription | Value | + | Test Estate 1 | Safaricom | Safaricom Contract | Variable Topup | Fixed | Merchant Commission | 2.50 | + | Test Estate 1 | PataPawa PostPay | PataPawa PostPay Contract | Post Pay Bill Pay | Percentage | Merchant Commission | 0.50 | + | Test Estate 1 | PataPawa PrePay | PataPawa PrePay Contract | Pre Pay Bill Pay | Percentage | Merchant Commission | 0.50 | + | Test Estate 2 | Safaricom | Safaricom Contract | Variable Topup | Percentage | Merchant Commission | 0.85 | + | Test Estate 2 | PataPawa PostPay | PataPawa PostPay Contract | Post Pay Bill Pay | Percentage | Merchant Commission | 0.50 | + | Test Estate 2 | PataPawa PrePay | PataPawa PrePay Contract | Pre Pay Bill Pay | Percentage | Merchant Commission | 0.50 | Given I create the following merchants | MerchantName | AddressLine1 | Town | Region | PostalCode |Country | ContactName | EmailAddress | EstateName | @@ -71,13 +137,22 @@ Background: | Test Merchant 3 | Address Line 1 | TestTown | Test Region | TE57 3NG |United Kingdom | Test Contact 3 | testcontact3@merchant2.co.uk | Test Estate 2 | Given I have assigned the following operator to the merchants - | OperatorName | MerchantName | MerchantNumber | TerminalNumber | EstateName | - | Safaricom | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | - | Voucher | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | - | Safaricom | Test Merchant 2 | 00000002 | 10000002 | Test Estate 1 | - | Voucher | Test Merchant 2 | 00000002 | 10000002 | Test Estate 1 | - | Safaricom | Test Merchant 3 | 00000003 | 10000003 | Test Estate 2 | - | Voucher | Test Merchant 3 | 00000003 | 10000003 | Test Estate 2 | + | OperatorName | MerchantName | MerchantNumber | TerminalNumber | EstateName | + | Safaricom | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | + | Voucher | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | + | PataPawa PostPay | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | + | PataPawa PrePay | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | + | AgencyBanking | Test Merchant 1 | 00000001 | 10000001 | Test Estate 1 | + | Safaricom | Test Merchant 2 | 00000002 | 10000002 | Test Estate 1 | + | Voucher | Test Merchant 2 | 00000002 | 10000002 | Test Estate 1 | + | PataPawa PostPay | Test Merchant 2 | 00000001 | 10000001 | Test Estate 1 | + | PataPawa PrePay | Test Merchant 2 | 00000001 | 10000001 | Test Estate 1 | + | AgencyBanking | Test Merchant 2 | 00000001 | 10000001 | Test Estate 1 | + | Safaricom | Test Merchant 3 | 00000003 | 10000003 | Test Estate 2 | + | Voucher | Test Merchant 3 | 00000003 | 10000003 | Test Estate 2 | + | PataPawa PostPay | Test Merchant 3 | 00000001 | 10000001 | Test Estate 2 | + | PataPawa PrePay | Test Merchant 3 | 00000001 | 10000001 | Test Estate 2 | + | AgencyBanking | Test Merchant 3 | 00000001 | 10000001 | Test Estate 2 | Given I have assigned the following devices to the merchants | DeviceIdentifier | MerchantName | EstateName | @@ -89,14 +164,23 @@ Background: | EstateName | MerchantName | ContractDescription | | Test Estate 1 | Test Merchant 1 | Safaricom Contract | | Test Estate 1 | Test Merchant 1 | Hospital 1 Contract | + | Test Estate 1 | Test Merchant 1 | PataPawa PostPay Contract | + | Test Estate 1 | Test Merchant 1 | PataPawa PrePay Contract | + | Test Estate 1 | Test Merchant 1 | AgencyBanking Contract | | Test Estate 1 | Test Merchant 2 | Safaricom Contract | | Test Estate 1 | Test Merchant 2 | Hospital 1 Contract | + | Test Estate 1 | Test Merchant 2 | PataPawa PostPay Contract | + | Test Estate 1 | Test Merchant 2 | PataPawa PrePay Contract | + | Test Estate 1 | Test Merchant 2 | AgencyBanking Contract | | Test Estate 2 | Test Merchant 3 | Safaricom Contract | | Test Estate 2 | Test Merchant 3 | Hospital 1 Contract | + | Test Estate 2 | Test Merchant 3 | PataPawa PostPay Contract | + | Test Estate 2 | Test Merchant 3 | PataPawa PrePay Contract | + | Test Estate 2 | Test Merchant 3 | AgencyBanking Contract | Given I make the following manual merchant deposits | Reference | Amount | DateTime | MerchantName | EstateName | - | Deposit1 | 210.00 | Today | Test Merchant 1 | Test Estate 1 | + | Deposit1 | 365.00 | Today | Test Merchant 1 | Test Estate 1 | | Deposit1 | 110.00 | Today | Test Merchant 2 | Test Estate 1 | | Deposit1 | 110.00 | Today | Test Merchant 3 | Test Estate 2 | @@ -110,10 +194,19 @@ Background: Scenario: Sale Transaction Given I am logged in as "merchantuser@testmerchant1.co.uk" with password "123456" for Merchant "Test Merchant 1" for Estate "Test Estate 1" with client "merchantClient" When I perform the following transactions - | DateTime | TransactionNumber | TransactionType | MerchantName | DeviceIdentifier | EstateName | OperatorName | TransactionAmount | CustomerAccountNumber | CustomerEmailAddress | ContractDescription | ProductName | RecipientEmail | RecipientMobile | - | Today | 1 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | Safaricom | 100.00 | 123456789 | | Safaricom Contract | Variable Topup | | | - | Today | 4 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | Safaricom | 100.00 | 123456789 | testcustomer@customer.co.uk | Safaricom Contract | Variable Topup | | | - | Today | 5 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | Voucher | 10.00 | | | Hospital 1 Contract | 10 KES | test@recipient.co.uk | | + | DateTime | TransactionNumber | TransactionType | MerchantName | DeviceIdentifier | EstateName | OperatorName | TransactionAmount | CustomerAccountNumber | CustomerEmailAddress | ContractDescription | ProductName | RecipientEmail | RecipientMobile | MessageType | AccountNumber | CustomerName | MeterNumber | + | Today | 1 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | Safaricom | 100.00 | 123456789 | | Safaricom Contract | Variable Topup | | | | | | | + | Today | 4 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | Safaricom | 100.00 | 123456789 | testcustomer@customer.co.uk | Safaricom Contract | Variable Topup | | | | | | | + | Today | 5 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | Voucher | 10.00 | | | Hospital 1 Contract | 10 KES | test@recipient.co.uk | | | | | | + | Today | 8 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | PataPawa PostPay | 0.00 | | | PataPawa PostPay Contract | Post Pay Bill Pay | test@recipient.co.uk | | VerifyAccount | 12345678 | | | + | Today | 9 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | PataPawa PostPay | 20.00 | | | PataPawa PostPay Contract | Post Pay Bill Pay | test@recipient.co.uk | 123456789 | ProcessBill | 12345678 | Mr Test Customer | | + | Today | 10 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | PataPawa PrePay | 0.00 | | | PataPawa PrePay Contract | Pre Pay Bill Pay | test@recipient.co.uk | | meter | | | 00000001 | + | Today | 11 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | PataPawa PrePay | 25.00 | | | PataPawa PrePay Contract | Pre Pay Bill Pay | test@recipient.co.uk | | vend | 00000001 | Customer 1 | 00000001 | + | Today | 12 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | AgencyBanking | 0.00 | | | AgencyBanking Contract | Balance Enquiry | | 12345678 | balanceenquiry | 12345678 | | | + | Today | 13 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | AgencyBanking | 100.00 | | | AgencyBanking Contract | Deposit | | 12345678 | deposit | 12345678 | | | + | Today | 14 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | AgencyBanking | 9.00 | | | AgencyBanking Contract | Withdrawal | | 12345678 | withdrawal | 12345678 | | | + | Today | 15 | Sale | Test Merchant 1 | 123456780 | Test Estate 1 | AgencyBanking | 0.00 | | | AgencyBanking Contract | MiniStatement | | 12345678 | ministatement | 12345678 | | | + Given I am logged in as "merchantuser@testmerchant2.co.uk" with password "123456" for Merchant "Test Merchant 2" for Estate "Test Estate 1" with client "merchantClient" When I perform the following transactions diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs index 6386cb2..325bf5d 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs @@ -111,157 +111,330 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table93 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table1 = new global::Reqnroll.Table(new string[] { "Role Name"}); - table93.AddRow(new string[] { + table1.AddRow(new string[] { "Merchant"}); #line 6 - await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table93, "Given "); + await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table1, "Given "); #line hidden - global::Reqnroll.Table table94 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table2 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table94.AddRow(new string[] { + table2.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); - table94.AddRow(new string[] { + table2.AddRow(new string[] { "transactionProcessorACL", "Transaction Processor ACL REST Scope", "A scope for Transaction Processor ACL REST"}); #line 10 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table94, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table2, "Given "); #line hidden - global::Reqnroll.Table table95 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table3 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table95.AddRow(new string[] { + table3.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST", "Secret1", "transactionProcessor", "merchantId, estateId, role"}); - table95.AddRow(new string[] { + table3.AddRow(new string[] { "transactionProcessorACL", "Transaction Processor ACL REST", "Secret1", "transactionProcessorACL", "merchantId, estateId, role"}); #line 15 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table95, "Given "); + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table3, "Given "); #line hidden - global::Reqnroll.Table table96 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table4 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table96.AddRow(new string[] { + table4.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", "transactionProcessor,transactionProcessorACL", "client_credentials"}); - table96.AddRow(new string[] { + table4.AddRow(new string[] { "merchantClient", "Merchant Client", "Secret1", "transactionProcessorACL", "password"}); #line 20 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table96, "Given "); + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table4, "Given "); #line hidden - global::Reqnroll.Table table97 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table97.AddRow(new string[] { + table5.AddRow(new string[] { "serviceClient"}); #line 25 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor acl reso" + - "urces", ((string)(null)), table97, "Given "); + "urces", ((string)(null)), table5, "Given "); #line hidden - global::Reqnroll.Table table98 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table6 = new global::Reqnroll.Table(new string[] { + "AccountNumber", + "AccountName", + "DueDate", + "Amount"}); + table6.AddRow(new string[] { + "12345678", + "Test Account 1", + "Today", + "100.00"}); +#line 29 + await testRunner.GivenAsync("the following bills are available at the PataPawa PostPaid Host", ((string)(null)), table6, "Given "); +#line hidden + global::Reqnroll.Table table7 = new global::Reqnroll.Table(new string[] { + "Username", + "Password"}); + table7.AddRow(new string[] { + "operatora", + "1234567898"}); +#line 33 + await testRunner.GivenAsync("the following users are available at the PataPawa PrePay Host", ((string)(null)), table7, "Given "); +#line hidden + global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { + "MeterNumber", + "CustomerName"}); + table8.AddRow(new string[] { + "00000001", + "Customer 1"}); + table8.AddRow(new string[] { + "00000002", + "Customer 2"}); + table8.AddRow(new string[] { + "00000003", + "Customer 3"}); +#line 37 + await testRunner.GivenAsync("the following meters are available at the PataPawa PrePay Host", ((string)(null)), table8, "Given "); +#line hidden +#line 43 + await testRunner.GivenAsync("I initialise the Agency Banking Host", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden + global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] { + "Type", + "Code", + "Name", + "Currency"}); + table9.AddRow(new string[] { + "LIABILITY", + "200100", + "Agent Float GL", + "KES"}); + table9.AddRow(new string[] { + "LIABILITY", + "200200", + "Settlement Suspense GL", + "KES"}); + table9.AddRow(new string[] { + "EXPENSE", + "400100", + "Agent Commission GL", + "KES"}); + table9.AddRow(new string[] { + "LIABILITY", + "200300", + "Reversal GL", + "KES"}); + table9.AddRow(new string[] { + "INCOME", + "400200", + "Fee Income GL", + "KES"}); +#line 45 + await testRunner.GivenAsync("I create the following accounts", ((string)(null)), table9, "Given "); +#line hidden + global::Reqnroll.Table table10 = new global::Reqnroll.Table(new string[] { + "AccountNumber", + "BankCode", + "Currency", + "Name"}); + table10.AddRow(new string[] { + "999000001", + "001", + "KES", + "Main Settlement Account"}); +#line 53 + await testRunner.GivenAsync("I create the settlement account", ((string)(null)), table10, "Given "); +#line hidden + global::Reqnroll.Table table11 = new global::Reqnroll.Table(new string[] { + "CustomerId", + "FullName", + "PhoneNumber", + "NationalId", + "AccountNumber"}); + table11.AddRow(new string[] { + "CUST001", + "Test Customer 1", + "0712345678", + "12345678", + "12345678"}); +#line 57 + await testRunner.GivenAsync("I create the following customers", ((string)(null)), table11, "Given "); +#line hidden + global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table98.AddRow(new string[] { + table12.AddRow(new string[] { "Test Estate 1"}); - table98.AddRow(new string[] { + table12.AddRow(new string[] { "Test Estate 2"}); -#line 29 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table98, "Given "); +#line 61 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table12, "Given "); #line hidden - global::Reqnroll.Table table99 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table99.AddRow(new string[] { + table13.AddRow(new string[] { "Test Estate 1", "Safaricom", "True", "True"}); - table99.AddRow(new string[] { + table13.AddRow(new string[] { "Test Estate 1", "Voucher", "True", "True"}); - table99.AddRow(new string[] { + table13.AddRow(new string[] { + "Test Estate 1", + "PataPawa PostPay", + "False", + "False"}); + table13.AddRow(new string[] { + "Test Estate 1", + "PataPawa PrePay", + "False", + "False"}); + table13.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking", + "False", + "False"}); + table13.AddRow(new string[] { "Test Estate 2", "Safaricom", "True", "True"}); - table99.AddRow(new string[] { + table13.AddRow(new string[] { "Test Estate 2", "Voucher", "True", "True"}); -#line 34 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table99, "Given "); + table13.AddRow(new string[] { + "Test Estate 2", + "PataPawa PostPay", + "False", + "False"}); + table13.AddRow(new string[] { + "Test Estate 2", + "PataPawa PrePay", + "False", + "False"}); + table13.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking", + "False", + "False"}); +#line 66 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table13, "Given "); #line hidden - global::Reqnroll.Table table100 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table100.AddRow(new string[] { + table14.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table100.AddRow(new string[] { + table14.AddRow(new string[] { "Test Estate 1", "Voucher"}); - table100.AddRow(new string[] { + table14.AddRow(new string[] { + "Test Estate 1", + "PataPawa PostPay"}); + table14.AddRow(new string[] { + "Test Estate 1", + "PataPawa PrePay"}); + table14.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking"}); + table14.AddRow(new string[] { "Test Estate 2", "Safaricom"}); - table100.AddRow(new string[] { + table14.AddRow(new string[] { "Test Estate 2", "Voucher"}); -#line 41 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table100, "And "); + table14.AddRow(new string[] { + "Test Estate 2", + "PataPawa PostPay"}); + table14.AddRow(new string[] { + "Test Estate 2", + "PataPawa PrePay"}); + table14.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking"}); +#line 79 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table14, "And "); #line hidden - global::Reqnroll.Table table101 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table101.AddRow(new string[] { + table15.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table101.AddRow(new string[] { + table15.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); - table101.AddRow(new string[] { + table15.AddRow(new string[] { + "Test Estate 1", + "PataPawa PostPay", + "PataPawa PostPay Contract"}); + table15.AddRow(new string[] { + "Test Estate 1", + "PataPawa PrePay", + "PataPawa PrePay Contract"}); + table15.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking", + "AgencyBanking Contract"}); + table15.AddRow(new string[] { "Test Estate 2", "Safaricom", "Safaricom Contract"}); - table101.AddRow(new string[] { + table15.AddRow(new string[] { "Test Estate 2", "Voucher", "Hospital 1 Contract"}); -#line 48 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table101, "Given "); + table15.AddRow(new string[] { + "Test Estate 2", + "PataPawa PostPay", + "PataPawa PostPay Contract"}); + table15.AddRow(new string[] { + "Test Estate 2", + "PataPawa PrePay", + "PataPawa PrePay Contract"}); + table15.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking", + "AgencyBanking Contract"}); +#line 92 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table15, "Given "); #line hidden - global::Reqnroll.Table table102 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -269,7 +442,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table102.AddRow(new string[] { + table16.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -277,7 +450,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table102.AddRow(new string[] { + table16.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -285,7 +458,55 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); - table102.AddRow(new string[] { + table16.AddRow(new string[] { + "Test Estate 1", + "PataPawa PostPay", + "PataPawa PostPay Contract", + "Post Pay Bill Pay", + "Bill Pay (Post)", + "", + "BillPayment"}); + table16.AddRow(new string[] { + "Test Estate 1", + "PataPawa PrePay", + "PataPawa PrePay Contract", + "Pre Pay Bill Pay", + "Bill Pay (Pre)", + "", + "BillPayment"}); + table16.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking", + "AgencyBanking Contract", + "Balance Enquiry", + "Balance Enquiry", + "", + "MobileTopup"}); + table16.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking", + "AgencyBanking Contract", + "Deposit", + "Deposit", + "", + "MobileTopup"}); + table16.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking", + "AgencyBanking Contract", + "Withdrawal", + "Withdrawal", + "", + "MobileTopup"}); + table16.AddRow(new string[] { + "Test Estate 1", + "AgencyBanking", + "AgencyBanking Contract", + "MiniStatement", + "Mini Statement", + "", + "MobileTopup"}); + table16.AddRow(new string[] { "Test Estate 2", "Safaricom", "Safaricom Contract", @@ -293,7 +514,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table102.AddRow(new string[] { + table16.AddRow(new string[] { "Test Estate 2", "Voucher", "Hospital 1 Contract", @@ -301,10 +522,58 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); -#line 55 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table102, "When "); + table16.AddRow(new string[] { + "Test Estate 2", + "PataPawa PostPay", + "PataPawa PostPay Contract", + "Post Pay Bill Pay", + "Bill Pay (Post)", + "", + "BillPayment"}); + table16.AddRow(new string[] { + "Test Estate 2", + "PataPawa PrePay", + "PataPawa PrePay Contract", + "Pre Pay Bill Pay", + "Bill Pay (Pre)", + "", + "BillPayment"}); + table16.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking", + "AgencyBanking Contract", + "Balance Enquiry", + "Balance Enquiry", + "", + "MobileTopup"}); + table16.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking", + "AgencyBanking Contract", + "Deposit", + "Deposit", + "", + "MobileTopup"}); + table16.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking", + "AgencyBanking Contract", + "Withdrawal", + "Withdrawal", + "", + "MobileTopup"}); + table16.AddRow(new string[] { + "Test Estate 2", + "AgencyBanking", + "AgencyBanking Contract", + "MiniStatement", + "Mini Statement", + "", + "MobileTopup"}); +#line 105 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table16, "When "); #line hidden - global::Reqnroll.Table table103 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -312,7 +581,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CalculationType", "FeeDescription", "Value"}); - table103.AddRow(new string[] { + table17.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -320,7 +589,23 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Fixed", "Merchant Commission", "2.50"}); - table103.AddRow(new string[] { + table17.AddRow(new string[] { + "Test Estate 1", + "PataPawa PostPay", + "PataPawa PostPay Contract", + "Post Pay Bill Pay", + "Percentage", + "Merchant Commission", + "0.50"}); + table17.AddRow(new string[] { + "Test Estate 1", + "PataPawa PrePay", + "PataPawa PrePay Contract", + "Pre Pay Bill Pay", + "Percentage", + "Merchant Commission", + "0.50"}); + table17.AddRow(new string[] { "Test Estate 2", "Safaricom", "Safaricom Contract", @@ -328,10 +613,26 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Percentage", "Merchant Commission", "0.85"}); -#line 62 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table103, "When "); + table17.AddRow(new string[] { + "Test Estate 2", + "PataPawa PostPay", + "PataPawa PostPay Contract", + "Post Pay Bill Pay", + "Percentage", + "Merchant Commission", + "0.50"}); + table17.AddRow(new string[] { + "Test Estate 2", + "PataPawa PrePay", + "PataPawa PrePay Contract", + "Pre Pay Bill Pay", + "Percentage", + "Merchant Commission", + "0.50"}); +#line 124 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table17, "When "); #line hidden - global::Reqnroll.Table table104 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -341,7 +642,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table104.AddRow(new string[] { + table18.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -351,7 +652,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table104.AddRow(new string[] { + table18.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -361,7 +662,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 2", "testcontact2@merchant2.co.uk", "Test Estate 1"}); - table104.AddRow(new string[] { + table18.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -371,161 +672,251 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 3", "testcontact3@merchant2.co.uk", "Test Estate 2"}); -#line 67 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table104, "Given "); +#line 133 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table18, "Given "); #line hidden - global::Reqnroll.Table table105 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table105.AddRow(new string[] { + table19.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table105.AddRow(new string[] { + table19.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table105.AddRow(new string[] { + table19.AddRow(new string[] { + "PataPawa PostPay", + "Test Merchant 1", + "00000001", + "10000001", + "Test Estate 1"}); + table19.AddRow(new string[] { + "PataPawa PrePay", + "Test Merchant 1", + "00000001", + "10000001", + "Test Estate 1"}); + table19.AddRow(new string[] { + "AgencyBanking", + "Test Merchant 1", + "00000001", + "10000001", + "Test Estate 1"}); + table19.AddRow(new string[] { "Safaricom", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table105.AddRow(new string[] { + table19.AddRow(new string[] { "Voucher", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table105.AddRow(new string[] { + table19.AddRow(new string[] { + "PataPawa PostPay", + "Test Merchant 2", + "00000001", + "10000001", + "Test Estate 1"}); + table19.AddRow(new string[] { + "PataPawa PrePay", + "Test Merchant 2", + "00000001", + "10000001", + "Test Estate 1"}); + table19.AddRow(new string[] { + "AgencyBanking", + "Test Merchant 2", + "00000001", + "10000001", + "Test Estate 1"}); + table19.AddRow(new string[] { "Safaricom", "Test Merchant 3", "00000003", "10000003", "Test Estate 2"}); - table105.AddRow(new string[] { + table19.AddRow(new string[] { "Voucher", "Test Merchant 3", "00000003", "10000003", "Test Estate 2"}); -#line 73 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table105, "Given "); + table19.AddRow(new string[] { + "PataPawa PostPay", + "Test Merchant 3", + "00000001", + "10000001", + "Test Estate 2"}); + table19.AddRow(new string[] { + "PataPawa PrePay", + "Test Merchant 3", + "00000001", + "10000001", + "Test Estate 2"}); + table19.AddRow(new string[] { + "AgencyBanking", + "Test Merchant 3", + "00000001", + "10000001", + "Test Estate 2"}); +#line 139 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table19, "Given "); #line hidden - global::Reqnroll.Table table106 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table106.AddRow(new string[] { + table20.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); - table106.AddRow(new string[] { + table20.AddRow(new string[] { "123456781", "Test Merchant 2", "Test Estate 1"}); - table106.AddRow(new string[] { + table20.AddRow(new string[] { "123456782", "Test Merchant 3", "Test Estate 2"}); -#line 82 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table106, "Given "); +#line 157 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table20, "Given "); #line hidden - global::Reqnroll.Table table107 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table107.AddRow(new string[] { + table21.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table107.AddRow(new string[] { + table21.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); - table107.AddRow(new string[] { + table21.AddRow(new string[] { + "Test Estate 1", + "Test Merchant 1", + "PataPawa PostPay Contract"}); + table21.AddRow(new string[] { + "Test Estate 1", + "Test Merchant 1", + "PataPawa PrePay Contract"}); + table21.AddRow(new string[] { + "Test Estate 1", + "Test Merchant 1", + "AgencyBanking Contract"}); + table21.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Safaricom Contract"}); - table107.AddRow(new string[] { + table21.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Hospital 1 Contract"}); - table107.AddRow(new string[] { + table21.AddRow(new string[] { + "Test Estate 1", + "Test Merchant 2", + "PataPawa PostPay Contract"}); + table21.AddRow(new string[] { + "Test Estate 1", + "Test Merchant 2", + "PataPawa PrePay Contract"}); + table21.AddRow(new string[] { + "Test Estate 1", + "Test Merchant 2", + "AgencyBanking Contract"}); + table21.AddRow(new string[] { "Test Estate 2", "Test Merchant 3", "Safaricom Contract"}); - table107.AddRow(new string[] { + table21.AddRow(new string[] { "Test Estate 2", "Test Merchant 3", "Hospital 1 Contract"}); -#line 88 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table107, "When "); + table21.AddRow(new string[] { + "Test Estate 2", + "Test Merchant 3", + "PataPawa PostPay Contract"}); + table21.AddRow(new string[] { + "Test Estate 2", + "Test Merchant 3", + "PataPawa PrePay Contract"}); + table21.AddRow(new string[] { + "Test Estate 2", + "Test Merchant 3", + "AgencyBanking Contract"}); +#line 163 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table21, "When "); #line hidden - global::Reqnroll.Table table108 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table108.AddRow(new string[] { + table22.AddRow(new string[] { "Deposit1", - "210.00", + "365.00", "Today", "Test Merchant 1", "Test Estate 1"}); - table108.AddRow(new string[] { + table22.AddRow(new string[] { "Deposit1", "110.00", "Today", "Test Merchant 2", "Test Estate 1"}); - table108.AddRow(new string[] { + table22.AddRow(new string[] { "Deposit1", "110.00", "Today", "Test Merchant 3", "Test Estate 2"}); -#line 97 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table108, "Given "); +#line 181 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table22, "Given "); #line hidden - global::Reqnroll.Table table109 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", "FamilyName", "EstateName", "MerchantName"}); - table109.AddRow(new string[] { + table23.AddRow(new string[] { "merchantuser@testmerchant1.co.uk", "123456", "TestMerchant", "User1", "Test Estate 1", "Test Merchant 1"}); - table109.AddRow(new string[] { + table23.AddRow(new string[] { "merchantuser@testmerchant2.co.uk", "123456", "TestMerchant", "User2", "Test Estate 1", "Test Merchant 2"}); - table109.AddRow(new string[] { + table23.AddRow(new string[] { "merchantuser@testmerchant3.co.uk", "123456", "TestMerchant", "User3", "Test Estate 2", "Test Merchant 3"}); -#line 103 - await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table109, "Given "); +#line 187 + await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table23, "Given "); #line hidden } @@ -546,7 +937,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Sale Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 110 +#line 194 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -559,12 +950,12 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden -#line 111 +#line 195 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant1.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 1\" for Estate \"Test Estate 1\" with client \"merchantClient" + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - global::Reqnroll.Table table110 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -578,8 +969,12 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContractDescription", "ProductName", "RecipientEmail", - "RecipientMobile"}); - table110.AddRow(new string[] { + "RecipientMobile", + "MessageType", + "AccountNumber", + "CustomerName", + "MeterNumber"}); + table24.AddRow(new string[] { "Today", "1", "Sale", @@ -593,8 +988,12 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Safaricom Contract", "Variable Topup", "", + "", + "", + "", + "", ""}); - table110.AddRow(new string[] { + table24.AddRow(new string[] { "Today", "4", "Sale", @@ -608,8 +1007,12 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Safaricom Contract", "Variable Topup", "", + "", + "", + "", + "", ""}); - table110.AddRow(new string[] { + table24.AddRow(new string[] { "Today", "5", "Sale", @@ -623,16 +1026,172 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Hospital 1 Contract", "10 KES", "test@recipient.co.uk", + "", + "", + "", + "", + ""}); + table24.AddRow(new string[] { + "Today", + "8", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "PataPawa PostPay", + "0.00", + "", + "", + "PataPawa PostPay Contract", + "Post Pay Bill Pay", + "test@recipient.co.uk", + "", + "VerifyAccount", + "12345678", + "", + ""}); + table24.AddRow(new string[] { + "Today", + "9", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "PataPawa PostPay", + "20.00", + "", + "", + "PataPawa PostPay Contract", + "Post Pay Bill Pay", + "test@recipient.co.uk", + "123456789", + "ProcessBill", + "12345678", + "Mr Test Customer", ""}); -#line 112 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table110, "When "); + table24.AddRow(new string[] { + "Today", + "10", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "PataPawa PrePay", + "0.00", + "", + "", + "PataPawa PrePay Contract", + "Pre Pay Bill Pay", + "test@recipient.co.uk", + "", + "meter", + "", + "", + "00000001"}); + table24.AddRow(new string[] { + "Today", + "11", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "PataPawa PrePay", + "25.00", + "", + "", + "PataPawa PrePay Contract", + "Pre Pay Bill Pay", + "test@recipient.co.uk", + "", + "vend", + "00000001", + "Customer 1", + "00000001"}); + table24.AddRow(new string[] { + "Today", + "12", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "AgencyBanking", + "0.00", + "", + "", + "AgencyBanking Contract", + "Balance Enquiry", + "", + "12345678", + "balanceenquiry", + "12345678", + "", + ""}); + table24.AddRow(new string[] { + "Today", + "13", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "AgencyBanking", + "100.00", + "", + "", + "AgencyBanking Contract", + "Deposit", + "", + "12345678", + "deposit", + "12345678", + "", + ""}); + table24.AddRow(new string[] { + "Today", + "14", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "AgencyBanking", + "9.00", + "", + "", + "AgencyBanking Contract", + "Withdrawal", + "", + "12345678", + "withdrawal", + "12345678", + "", + ""}); + table24.AddRow(new string[] { + "Today", + "15", + "Sale", + "Test Merchant 1", + "123456780", + "Test Estate 1", + "AgencyBanking", + "0.00", + "", + "", + "AgencyBanking Contract", + "MiniStatement", + "", + "12345678", + "ministatement", + "12345678", + "", + ""}); +#line 196 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table24, "When "); #line hidden -#line 118 +#line 211 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant2.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 2\" for Estate \"Test Estate 1\" with client \"merchantClient" + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - global::Reqnroll.Table table111 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -647,7 +1206,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ProductName", "RecipientEmail", "RecipientMobile"}); - table111.AddRow(new string[] { + table25.AddRow(new string[] { "Today", "2", "Sale", @@ -662,7 +1221,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table111.AddRow(new string[] { + table25.AddRow(new string[] { "Today", "6", "Sale", @@ -677,15 +1236,15 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "123456789"}); -#line 119 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table111, "When "); +#line 212 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table25, "When "); #line hidden -#line 124 +#line 217 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant3.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 3\" for Estate \"Test Estate 2\" with client \"merchantClient" + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - global::Reqnroll.Table table112 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -700,7 +1259,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ProductName", "RecipientEmail", "RecipientMobile"}); - table112.AddRow(new string[] { + table26.AddRow(new string[] { "Today", "3", "Sale", @@ -715,7 +1274,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table112.AddRow(new string[] { + table26.AddRow(new string[] { "Today", "7", "Sale", @@ -730,67 +1289,67 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "test@recipient.co.uk", ""}); -#line 125 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table112, "When "); +#line 218 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table26, "When "); #line hidden - global::Reqnroll.Table table113 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "TransactionType", "ResponseCode", "ResponseMessage"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1", "Sale", "0000", "SUCCESS"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "2", "Sale", "0000", "SUCCESS"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 2", "Test Merchant 3", "3", "Sale", "0000", "SUCCESS"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "4", "Sale", "0000", "SUCCESS"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "5", "Sale", "0000", "SUCCESS"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "6", "Sale", "0000", "SUCCESS"}); - table113.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 2", "Test Merchant 3", "7", "Sale", "0000", "SUCCESS"}); -#line 130 - await testRunner.ThenAsync("the sale transaction response should contain the following information", ((string)(null)), table113, "Then "); +#line 223 + await testRunner.ThenAsync("the sale transaction response should contain the following information", ((string)(null)), table27, "Then "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs b/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs index 0209826..50b9dc8 100644 --- a/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs +++ b/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs @@ -19,6 +19,7 @@ namespace TransactionProcessorACL.IntegrationTests.Shared{ using System.Text.Json; using System.Threading; using System.Threading.Tasks; + using TestHosts.DataTransferObjects.AgencyBanking; using TransactionProcessor.DataTransferObjects; using TransactionProcessor.IntegrationTesting.Helpers; using TransactionProcessor.IntegrationTests.Common; @@ -324,7 +325,6 @@ public async Task WhenICreateTheFollowingEstates(DataTable table){ public async Task WhenICreateTheFollowingMerchants(DataTable table){ List estates = this.TestingContext.Estates.Select(e => e.EstateDetails).ToList(); List<(EstateDetails estate, CreateMerchantRequest, Boolean EnableAgencyBanking)> requests = table.Rows.ToCreateMerchantRequests(estates); - List verifiedMerchants = await this.TransactionProcessorSteps.WhenICreateTheFollowingMerchants(this.TestingContext.AccessToken, requests); foreach (TransactionProcessor.DataTransferObjects.Responses.Merchant.MerchantResponse verifiedMerchant in verifiedMerchants){ @@ -533,7 +533,96 @@ public void ThenTheRecentActivityReceiptSearchResponseForPageShouldContainItemsA expectedTotalCount); } + [Given(@"the following bills are available at the PataPawa PostPaid Host")] + public async Task GivenTheFollowingBillsAreAvailableAtThePataPawaPostPaidHost(DataTable table) + { + List bills = table.Rows.ToPataPawaBills(); + await this.TransactionProcessorSteps.GivenTheFollowingBillsAreAvailableAtThePataPawaPostPaidHost(bills); + } + + [Given(@"the following users are available at the PataPawa PrePay Host")] + public async Task GivenTheFollowingUsersAreAvailableAtThePataPawaPrePayHost(DataTable table) + { + List users = table.Rows.ToPataPawaUsers(); + await this.TransactionProcessorSteps.GivenTheFollowingUsersAreAvailableAtThePataPawaPrePaidHost(users); + } + + [Given(@"the following meters are available at the PataPawa PrePay Host")] + public async Task GivenTheFollowingMetersAreAvailableAtThePataPawaPrePayHost(DataTable table) + { + List meters = table.Rows.ToPataPawaMeters(); + await this.TransactionProcessorSteps.GivenTheFollowingMetersAreAvailableAtThePataPawaPrePaidHost(meters); + } + + [Given("I initialise the Agency Banking Host")] + public async Task GivenIInitialiseTheAgencyBankingHost() + { + SystemInitializationRequest request = new() + { + DefaultCurrency = "KES", + InstitutionCode = "BANK001", + InstitutionName = "Enterprise Bank", + Timezone = "Africa/Nairobi", + SettlementMode = "NET" + }; + var result = await this.TestingContext.DockerHelper.AgencyBankingClient.InitializeSystem(request, CancellationToken.None); + result.IsSuccess.ShouldBeTrue("Error initializing Agency Banking Host"); + + } + + [Given("I create the following accounts")] + public async Task GivenICreateTheFollowingAccounts(DataTable dataTable) + { + foreach (DataTableRow dataTableRow in dataTable.Rows) + { + + CreateGlAccountRequest request = new() + { + Currency = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "Currency"), + GlCode = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "Code"), + GlName = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "Name"), + GlType = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "Type") + }; + Result result = await this.TestingContext.DockerHelper.AgencyBankingClient.CreateGlAccount(request, CancellationToken.None); + result.IsSuccess.ShouldBeTrue($"Error creating GL account {request.GlCode}"); + } + } + + [Given("I create the following customers")] + public async Task GivenICreateTheFollowingCustomers(DataTable dataTable) + { + foreach (DataTableRow dataTableRow in dataTable.Rows) + { + //| CustomerId | FullName | PhoneNumber | NationalId | AccountNumber | + CreateCustomerRequest request = new CreateCustomerRequest + { + AccountNumber = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "AccountNumber"), + CustomerId = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "CustomerId"), + FullName = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "FullName"), + PhoneNumber = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "PhoneNumber"), + NationalId = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "NationalId") + }; + Result result = await this.TestingContext.DockerHelper.AgencyBankingClient.CreateCustomer(request, CancellationToken.None); + result.IsSuccess.ShouldBeTrue($"Error creating customer {request.AccountNumber}"); + } + } + [Given("I create the settlement account")] + public async Task GivenICreateTheSettlementAccount(DataTable dataTable) + { + foreach (DataTableRow dataTableRow in dataTable.Rows) + { + CreateSettlementAccountRequest request = new() + { + AccountNumber = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "AccountNumber"), + AccountName = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "AccountName"), + BankCode = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "BankCode"), + Currency = ReqnrollTableHelper.GetStringRowValue(dataTableRow, "Currency") + }; + Result result = await this.TestingContext.DockerHelper.AgencyBankingClient.CreateSettlementAccount(request, CancellationToken.None); + result.IsSuccess.ShouldBeTrue($"Error creating settlement account {request.AccountNumber}"); + } + } #endregion From 4e7bcea8d5b99c49470d2e46f80d5e320351ff85 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 14:00:00 +0100 Subject: [PATCH 2/7] code review fixes --- .../SaleTransaction/SalesTransaction.feature | 10 +++++----- .../SaleTransaction/SalesTransaction.feature.cs | 12 ++++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature index 6266406..fcd7b4d 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature @@ -51,7 +51,7 @@ Background: | INCOME | 400200 | Fee Income GL | KES | Given I create the settlement account - | AccountNumber | BankCode | Currency | Name | + | AccountNumber | BankCode | Currency | AccountName | | 999000001 | 001 | KES | Main Settlement Account | Given I create the following customers @@ -131,10 +131,10 @@ Background: | Test Estate 2 | PataPawa PrePay | PataPawa PrePay Contract | Pre Pay Bill Pay | Percentage | Merchant Commission | 0.50 | Given I create the following merchants - | MerchantName | AddressLine1 | Town | Region | PostalCode |Country | ContactName | EmailAddress | EstateName | - | Test Merchant 1 | Address Line 1 | TestTown | Test Region | TE57 1NG |United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 | - | Test Merchant 2 | Address Line 1 | TestTown | Test Region | TE57 2NG |United Kingdom | Test Contact 2 | testcontact2@merchant2.co.uk | Test Estate 1 | - | Test Merchant 3 | Address Line 1 | TestTown | Test Region | TE57 3NG |United Kingdom | Test Contact 3 | testcontact3@merchant2.co.uk | Test Estate 2 | + | MerchantName | AddressLine1 | Town | Region | PostalCode |Country | ContactName | EmailAddress | EstateName | EnableAgencyBanking | + | Test Merchant 1 | Address Line 1 | TestTown | Test Region | TE57 1NG |United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 | True | + | Test Merchant 2 | Address Line 1 | TestTown | Test Region | TE57 2NG |United Kingdom | Test Contact 2 | testcontact2@merchant2.co.uk | Test Estate 1 | False | + | Test Merchant 3 | Address Line 1 | TestTown | Test Region | TE57 3NG |United Kingdom | Test Contact 3 | testcontact3@merchant2.co.uk | Test Estate 2 | False | Given I have assigned the following operator to the merchants | OperatorName | MerchantName | MerchantNumber | TerminalNumber | EstateName | diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs index 325bf5d..b22f181 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs @@ -641,7 +641,8 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Country", "ContactName", "EmailAddress", - "EstateName"}); + "EstateName", + "EnableAgencyBanking"}); table18.AddRow(new string[] { "Test Merchant 1", "Address Line 1", @@ -651,7 +652,8 @@ await testRunner.GivenAsync("I have a token to access the estate management and "United Kingdom", "Test Contact 1", "testcontact1@merchant1.co.uk", - "Test Estate 1"}); + "Test Estate 1", + "True"}); table18.AddRow(new string[] { "Test Merchant 2", "Address Line 1", @@ -661,7 +663,8 @@ await testRunner.GivenAsync("I have a token to access the estate management and "United Kingdom", "Test Contact 2", "testcontact2@merchant2.co.uk", - "Test Estate 1"}); + "Test Estate 1", + "False"}); table18.AddRow(new string[] { "Test Merchant 3", "Address Line 1", @@ -671,7 +674,8 @@ await testRunner.GivenAsync("I have a token to access the estate management and "United Kingdom", "Test Contact 3", "testcontact3@merchant2.co.uk", - "Test Estate 2"}); + "Test Estate 2", + "False"}); #line 133 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table18, "Given "); #line hidden From d6f37f826ffccc371298233a95a0e235f35b5718 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 14:40:27 +0100 Subject: [PATCH 3/7] Set insecure event store and correct sale transaction field --- TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs | 1 + .../SaleTransaction/SalesTransaction.feature.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs index 6f62b65..fafd2e4 100644 --- a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs @@ -57,6 +57,7 @@ public class DockerHelper : global::Shared.IntegrationTesting.TestContainers.Doc /// The logger. public DockerHelper() { + this.IsSecureEventStore = false; this.TestingContext = new TestingContext(); StringSerialiser.Initialise((IStringSerialiser)new SystemTextJsonSerializer(SystemTextJsonSerializer.GetDefaultJsonSerializerOptions())); } diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs index b22f181..db16210 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs @@ -260,7 +260,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "AccountNumber", "BankCode", "Currency", - "Name"}); + "AccountName"}); table10.AddRow(new string[] { "999000001", "001", From cd386fefd8bed3c2bfbcbb2dc89b5cb196f1a9f0 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 16:51:37 +0100 Subject: [PATCH 4/7] Improve integration test failure diagnostics --- .../Common/DockerHelper.cs | 43 ++++++++++++++++++- .../Shared/ACLSteps.cs | 5 +-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs index fafd2e4..bf313f2 100644 --- a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs @@ -9,6 +9,7 @@ namespace TransactionProcessor.IntegrationTests.Common using Shared.Serialisation; using System; using System.Collections.Generic; + using System.Diagnostics; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -93,7 +94,15 @@ public override async Task CreateSubscriptions(){ /// Name of the scenario. public override async Task StartContainersForScenarioRun(String scenarioName, DockerServices dockerServices) { - await base.StartContainersForScenarioRun(scenarioName, dockerServices); + try + { + await base.StartContainersForScenarioRun(scenarioName, dockerServices); + } + catch + { + this.DumpDockerContainerState(); + throw; + } // Setup the base address resolvers String SecurityServiceBaseAddressResolver(String api) => $"https://127.0.0.1:{this.SecurityServicePort}"; @@ -127,6 +136,38 @@ public override async Task StartContainersForScenarioRun(String scenarioName, Do } + private void DumpDockerContainerState() + { + ProcessStartInfo startInfo = new ProcessStartInfo + { + FileName = "docker", + Arguments = "ps -a --no-trunc --format \"table {{.ID}}\\t{{.Names}}\\t{{.Status}}\\t{{.Image}}\\t{{.Ports}}\"", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + using Process process = Process.Start(startInfo); + if (process == null) + { + Console.WriteLine("Unable to start docker diagnostics process."); + return; + } + + String output = process.StandardOutput.ReadToEnd(); + String error = process.StandardError.ReadToEnd(); + process.WaitForExit(); + + Console.WriteLine("Docker containers at container startup failure:"); + Console.WriteLine(output); + if (String.IsNullOrWhiteSpace(error) == false) + { + Console.WriteLine("Docker diagnostics error:"); + Console.WriteLine(error); + } + } + String Serialise(Object arg) { return StringSerialiser.Serialise(arg, new SerialiserOptions(SerialiserPropertyFormat.SnakeCase)); diff --git a/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs b/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs index 0c1605a..c6824d0 100644 --- a/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs +++ b/TransactionProcessorACL.IntegrationTests/Shared/ACLSteps.cs @@ -84,11 +84,10 @@ private async Task SendAclRequestMessage(String uri, this.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); HttpResponseMessage response = await this.HttpClient.PostAsync(uri, content, cancellationToken).ConfigureAwait(false); - - response.IsSuccessStatusCode.ShouldBeTrue(); - String responseContent = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + response.IsSuccessStatusCode.ShouldBeTrue($"HTTP {(Int32)response.StatusCode} {response.ReasonPhrase}. Response: {responseContent}"); + responseContent.ShouldNotBeNullOrEmpty("No response message received"); TransactionResponse transactionResponse = StringSerialiser.Deserialise(responseContent); From eb4bf2035c2cb5c69d338b2ca52f7aa166689e32 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 17:09:46 +0100 Subject: [PATCH 5/7] Limit integration test parallelism to one worker --- TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs b/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs index 186aeec..24d036a 100644 --- a/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs +++ b/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs @@ -16,5 +16,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM. [assembly: Guid("25d4d6fc-b809-4acc-a910-249a03e5f07a")] -[assembly: LevelOfParallelism(2)] -[assembly: Parallelizable(ParallelScope.Fixtures)] \ No newline at end of file +[assembly: LevelOfParallelism(1)] +[assembly: Parallelizable(ParallelScope.Fixtures)] From 451b982e82cfe390ca1fb84e9a7ff8cc1e26cd88 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 17:51:23 +0100 Subject: [PATCH 6/7] :| --- .../Common/DockerHelper.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs index bf313f2..d4306dd 100644 --- a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs @@ -1,6 +1,7 @@ using EventStore.Client; using Shared.IntegrationTesting; using System.Linq; +using DotNet.Testcontainers.Builders; namespace TransactionProcessor.IntegrationTests.Common { @@ -75,6 +76,17 @@ public override DotNet.Testcontainers.Builders.ContainerBuilder SetupEstateRepor return base.SetupEstateReportingContainer(); } + + public override ContainerBuilder SetupTransactionProcessorContainer() + { + Dictionary additionalVariables = new(); + additionalVariables.Add("OperatorConfiguration:AgencyBanking:Url", $"http://{this.TestHostContainerName}:{DockerPorts.TestHostPort}/api/agencybanking"); + + this.AdditionalVariables.Add(ContainerType.TransactionProcessor, additionalVariables); + + return base.SetupTransactionProcessorContainer(); + } + public override async Task CreateSubscriptions(){ List<(String streamName, String groupName, Int32 maxRetries)> subscriptions = new List<(String streamName, String groupName, Int32 maxRetries)>(); subscriptions.AddRange(MessagingService.IntegrationTesting.Helpers.SubscriptionsHelper.GetSubscriptions()); From 09f232991ccb4d7becb7bca99dc586ac589d117b Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Tue, 1 Sep 2026 18:11:41 +0100 Subject: [PATCH 7/7] Increase integration test parallelism --- TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs b/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs index 24d036a..2bf6799 100644 --- a/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs +++ b/TransactionProcessorACL.IntegrationTests/AssemblyInfo.cs @@ -16,5 +16,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM. [assembly: Guid("25d4d6fc-b809-4acc-a910-249a03e5f07a")] -[assembly: LevelOfParallelism(1)] +[assembly: LevelOfParallelism(3)] [assembly: Parallelizable(ParallelScope.Fixtures)]