diff --git a/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs b/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs index 47766d23..7927fce3 100644 --- a/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs +++ b/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs @@ -126,7 +126,6 @@ public async Task Mediator_Send_RequestHandled() this.AddTestRegistrations(services, hostingEnvironment.Object); s.ConfigureContainer(services); - Startup.Container.AssertConfigurationIsValid(AssertMode.Full); List errors = new List(); IMediator mediator = Startup.Container.GetService(); diff --git a/TransactionProcessor.IntegrationTests/Features/Contract.feature b/TransactionProcessor.IntegrationTests/Features/Contract.feature index b14c97e8..3d82385b 100644 --- a/TransactionProcessor.IntegrationTests/Features/Contract.feature +++ b/TransactionProcessor.IntegrationTests/Features/Contract.feature @@ -8,16 +8,15 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | + | transactionProcessor | Estate Managememt REST Scope | A scope for Estate Managememt REST | Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | merchantId, estateId, role | - + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | merchantId, estateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement | client_credentials | - | estateClient | Estate Client | Secret1 | estateManagement | password | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | + | estateClient | Estate Client | Secret1 | transactionProcessor | password | Given I have a token to access the estate management resource | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs b/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs index 0ca8d499..f5f87de7 100644 --- a/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs @@ -123,7 +123,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "DisplayName", "Description"}); table2.AddRow(new string[] { - "estateManagement", + "transactionProcessor", "Estate Managememt REST Scope", "A scope for Estate Managememt REST"}); #line 9 @@ -136,10 +136,10 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Scopes", "UserClaims"}); table3.AddRow(new string[] { - "estateManagement", + "transactionProcessor", "Estate Managememt REST", "Secret1", - "estateManagement", + "transactionProcessor", "merchantId, estateId, role"}); #line 13 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table3, "Given "); @@ -154,22 +154,22 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "serviceClient", "Service Client", "Secret1", - "estateManagement", + "transactionProcessor", "client_credentials"}); table4.AddRow(new string[] { "estateClient", "Estate Client", "Secret1", - "estateManagement", + "transactionProcessor", "password"}); -#line 17 +#line 16 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table4, "Given "); #line hidden global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "ClientId"}); table5.AddRow(new string[] { "serviceClient"}); -#line 22 +#line 21 await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table5, "Given "); #line hidden global::Reqnroll.Table table6 = new global::Reqnroll.Table(new string[] { @@ -178,7 +178,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 1"}); table6.AddRow(new string[] { "Test Estate 2"}); -#line 26 +#line 25 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table6, "Given "); #line hidden global::Reqnroll.Table table7 = new global::Reqnroll.Table(new string[] { @@ -196,7 +196,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Operator 1", "False", "False"}); -#line 31 +#line 30 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table7, "Given "); #line hidden global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { @@ -208,7 +208,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa table8.AddRow(new string[] { "Test Estate 2", "Test Operator 1"}); -#line 36 +#line 35 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table8, "And "); #line hidden global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] { @@ -229,7 +229,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "TestEstate", "User1", "Test Estate 2"}); -#line 41 +#line 40 await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table9, "Given "); #line hidden } @@ -249,7 +249,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Merchant Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 46 +#line 45 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -292,7 +292,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant2.co.uk", "Test Estate 2"}); -#line 48 +#line 47 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table10, "Given "); #line hidden global::Reqnroll.Table table11 = new global::Reqnroll.Table(new string[] { @@ -307,7 +307,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 2", "Test Operator 1", "Operator 1 Contract Estate 2"}); -#line 53 +#line 52 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table11, "Given "); #line hidden global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] { @@ -350,7 +350,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Custom", "", "MobileTopup"}); -#line 58 +#line 57 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table12, "When "); #line hidden global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] { @@ -407,7 +407,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Merchant Commission", "2.25", "Merchant"}); -#line 65 +#line 64 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table13, "When "); #line hidden global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { @@ -422,7 +422,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 2", "Test Merchant 2", "Operator 1 Contract Estate 2"}); -#line 73 +#line 72 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table14, "When "); #line hidden global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { @@ -434,7 +434,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa table15.AddRow(new string[] { "Operator 1 Contract Estate 1", "Variable Topup 1"}); -#line 78 +#line 77 await testRunner.ThenAsync("I get the Contracts for \'Test Estate 1\' the following contract details are return" + "ed", ((string)(null)), table15, "Then "); #line hidden @@ -447,7 +447,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa table16.AddRow(new string[] { "Operator 1 Contract Estate 2", "Variable Topup 2"}); -#line 83 +#line 82 await testRunner.ThenAsync("I get the Contracts for \'Test Estate 2\' the following contract details are return" + "ed", ((string)(null)), table16, "Then "); #line hidden @@ -460,7 +460,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa table17.AddRow(new string[] { "Operator 1 Contract Estate 1", "Variable Topup 1"}); -#line 88 +#line 87 await testRunner.ThenAsync("I get the Merchant Contracts for \'Test Merchant 1\' for \'Test Estate 1\' the follow" + "ing contract details are returned", ((string)(null)), table17, "Then "); #line hidden @@ -473,7 +473,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa table18.AddRow(new string[] { "Operator 1 Contract Estate 2", "Variable Topup 2"}); -#line 93 +#line 92 await testRunner.ThenAsync("I get the Merchant Contracts for \'Test Merchant 2\' for \'Test Estate 2\' the follow" + "ing contract details are returned", ((string)(null)), table18, "Then "); #line hidden @@ -492,7 +492,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Merchant Commission", "0.015", "Merchant"}); -#line 98 +#line 97 await testRunner.ThenAsync("I get the Transaction Fees for \'100 KES Topup\' on the \'Operator 1 Contract Estate" + " 1\' contract for \'Test Estate 1\' the following fees are returned", ((string)(null)), table19, "Then "); #line hidden @@ -506,7 +506,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Merchant Commission", "1.50", "Merchant"}); -#line 103 +#line 102 await testRunner.ThenAsync("I get the Transaction Fees for \'Variable Topup 1\' on the \'Operator 1 Contract Est" + "ate 1\' contract for \'Test Estate 1\' the following fees are returned", ((string)(null)), table20, "Then "); #line hidden @@ -520,7 +520,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Merchant Commission", "0.25", "Merchant"}); -#line 107 +#line 106 await testRunner.ThenAsync("I get the Transaction Fees for \'200 KES Topup\' on the \'Operator 1 Contract Estate" + " 2\' contract for \'Test Estate 2\' the following fees are returned", ((string)(null)), table21, "Then "); #line hidden @@ -534,7 +534,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Merchant Commission", "2.25", "Merchant"}); -#line 111 +#line 110 await testRunner.ThenAsync("I get the Transaction Fees for \'Variable Topup 2\' on the \'Operator 1 Contract Est" + "ate 2\' contract for \'Test Estate 2\' the following fees are returned", ((string)(null)), table22, "Then "); #line hidden @@ -552,7 +552,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Prevent Duplicate Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 116 +#line 115 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -573,7 +573,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 1", "Test Operator 1", "Operator 1 Contract"}); -#line 118 +#line 117 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table23, "Given "); #line hidden global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { @@ -584,7 +584,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 1", "Test Operator 1", "Operator 1 Contract"}); -#line 122 +#line 121 await testRunner.WhenAsync("I create another contract with the same values it should be rejected", ((string)(null)), table24, "When "); #line hidden } diff --git a/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature b/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature index d9f6f99d..03aea925 100644 --- a/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature +++ b/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature @@ -5,17 +5,15 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | | transactionProcessor | Transaction Processor REST Scope | A scope for Transaction Processor REST | Given the following api resources exist - | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role | - | transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | | + | Name | DisplayName | Secret | Scopes | UserClaims | + | transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | MerchantId, EstateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement,transactionProcessor | client_credentials | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | Given I have a token to access the estate management and transaction processor resources | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs b/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs index c6455e27..92597123 100644 --- a/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs @@ -111,95 +111,85 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table41.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST Scope", - "A scope for Estate Managememt REST"}); - table41.AddRow(new string[] { + table25.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); #line 6 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table41, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table25, "Given "); #line hidden - global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table42.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST", - "Secret1", - "estateManagement", - "MerchantId, EstateId, role"}); - table42.AddRow(new string[] { + table26.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST", "Secret1", "transactionProcessor", - ""}); -#line 11 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table42, "Given "); + "MerchantId, EstateId, role"}); +#line 10 + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table26, "Given "); #line hidden - global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table43.AddRow(new string[] { + table27.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement,transactionProcessor", + "transactionProcessor", "client_credentials"}); -#line 16 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table43, "Given "); +#line 14 + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table27, "Given "); #line hidden - global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table44.AddRow(new string[] { + table28.AddRow(new string[] { "serviceClient"}); -#line 20 +#line 18 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table44, "Given "); + "s", ((string)(null)), table28, "Given "); #line hidden - global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table45.AddRow(new string[] { + table29.AddRow(new string[] { "Test Estate 1"}); -#line 24 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table45, "Given "); +#line 22 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table29, "Given "); #line hidden - global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table46.AddRow(new string[] { + table30.AddRow(new string[] { "Test Estate 1", "Test Operator 1", "False", "False"}); -#line 28 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table46, "Given "); +#line 26 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table30, "Given "); #line hidden - global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table47.AddRow(new string[] { + table31.AddRow(new string[] { "Test Estate 1", "Test Operator 1"}); -#line 32 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table47, "And "); +#line 30 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table31, "And "); #line hidden - global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -209,7 +199,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -219,7 +209,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -229,7 +219,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 2", "testcontact2@merchant2.co.uk", "Test Estate 1"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -239,7 +229,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 3", "testcontact3@merchant2.co.uk", "Test Estate 1"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 4", "Address Line 1", "TestTown", @@ -249,7 +239,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 4", "testcontact4@merchant2.co.uk", "Test Estate 1"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 5", "Address Line 1", "TestTown", @@ -259,7 +249,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 5", "testcontact5@merchant2.co.uk", "Test Estate 1"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 6", "Address Line 1", "TestTown", @@ -269,7 +259,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 6", "testcontact6@merchant2.co.uk", "Test Estate 1"}); - table48.AddRow(new string[] { + table32.AddRow(new string[] { "Test Merchant 7", "Address Line 1", "TestTown", @@ -279,59 +269,59 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 7", "testcontact7@merchant2.co.uk", "Test Estate 1"}); -#line 36 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table48, "Given "); +#line 34 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table32, "Given "); #line hidden - global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 2", "00000001", "10000001", "Test Estate 1"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 3", "00000001", "10000001", "Test Estate 1"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 4", "00000001", "10000001", "Test Estate 1"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 5", "00000001", "10000001", "Test Estate 1"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 6", "00000001", "10000001", "Test Estate 1"}); - table49.AddRow(new string[] { + table33.AddRow(new string[] { "Test Operator 1", "Test Merchant 7", "00000001", "10000001", "Test Estate 1"}); -#line 46 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table49, "Given "); +#line 44 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table33, "Given "); #line hidden } @@ -352,7 +342,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Logon Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 57 +#line 55 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -365,205 +355,205 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table34 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", "MerchantName", "DeviceIdentifier", "EstateName"}); - table50.AddRow(new string[] { + table34.AddRow(new string[] { "Today", "1", "Logon", "Test Merchant 1", "123456780", "Test Estate 1"}); - table50.AddRow(new string[] { + table34.AddRow(new string[] { "Today", "2", "Logon", "Test Merchant 2", "123456781", "Test Estate 1"}); - table50.AddRow(new string[] { + table34.AddRow(new string[] { "Today", "3", "Logon", "Test Merchant 3", "123456782", "Test Estate 1"}); -#line 59 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table50, "When "); +#line 57 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table34, "When "); #line hidden - global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table51.AddRow(new string[] { + table35.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1", "0001", "SUCCESS"}); - table51.AddRow(new string[] { + table35.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "2", "0001", "SUCCESS"}); - table51.AddRow(new string[] { + table35.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "3", "0001", "SUCCESS"}); -#line 65 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table51, "Then "); +#line 63 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table35, "Then "); #line hidden - global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "MerchantNumber", "EstateName"}); - table52.AddRow(new string[] { + table36.AddRow(new string[] { "123456783", "Test Merchant 4", "00000001", "Test Estate 1"}); -#line 71 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table52, "Given "); +#line 69 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table36, "Given "); #line hidden - global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", "MerchantName", "DeviceIdentifier", "EstateName"}); - table53.AddRow(new string[] { + table37.AddRow(new string[] { "Today", "4", "Logon", "Test Merchant 4", "123456783", "Test Estate 1"}); -#line 75 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table53, "When "); +#line 73 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table37, "When "); #line hidden - global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table54.AddRow(new string[] { + table38.AddRow(new string[] { "Test Estate 1", "Test Merchant 4", "4", "0000", "SUCCESS"}); -#line 79 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table54, "Then "); +#line 77 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table38, "Then "); #line hidden - global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", "MerchantName", "DeviceIdentifier", "EstateName"}); - table55.AddRow(new string[] { + table39.AddRow(new string[] { "Today", "5", "Logon", "Test Merchant 1", "13579135", "Test Estate 1"}); -#line 83 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table55, "When "); +#line 81 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table39, "When "); #line hidden - global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table56.AddRow(new string[] { + table40.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "5", "1000", "Device Identifier 13579135 not valid for Merchant Test Merchant 1"}); -#line 87 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table56, "Then "); +#line 85 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table40, "Then "); #line hidden - global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", "MerchantName", "DeviceIdentifier", "EstateName"}); - table57.AddRow(new string[] { + table41.AddRow(new string[] { "Today", "6", "Logon", "Test Merchant 1", "123456785", "InvalidEstate"}); -#line 91 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table57, "When "); +#line 89 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table41, "When "); #line hidden - global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table58.AddRow(new string[] { + table42.AddRow(new string[] { "InvalidEstate", "Test Merchant 1", "6", "1001", "Estate Id [79902550-64df-4491-b0c1-4e78943928a3] is not a valid estate"}); -#line 95 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table58, "Then "); +#line 93 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table42, "Then "); #line hidden - global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", "MerchantName", "DeviceIdentifier", "EstateName"}); - table59.AddRow(new string[] { + table43.AddRow(new string[] { "Today", "7", "Logon", "InvalidMerchant", "123456786", "Test Estate 1"}); -#line 99 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table59, "When "); +#line 97 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table43, "When "); #line hidden - global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table60.AddRow(new string[] { + table44.AddRow(new string[] { "Test Estate 1", "InvalidMerchant", "7", "1002", "Merchant Id [d59320fa-4c3e-4900-a999-483f6a10c69a] is not a valid merchant for es" + "tate [Test Estate 1]"}); -#line 103 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table60, "Then "); +#line 101 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table44, "Then "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/Merchant.feature b/TransactionProcessor.IntegrationTests/Features/Merchant.feature index eae3564c..6e92393a 100644 --- a/TransactionProcessor.IntegrationTests/Features/Merchant.feature +++ b/TransactionProcessor.IntegrationTests/Features/Merchant.feature @@ -10,16 +10,16 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | + | transactionProcessor | Estate Managememt REST Scope | A scope for Estate Managememt REST | Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | merchantId, estateId, role | + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | merchantId, estateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement | client_credentials | - | estateClient | Estate Client | Secret1 | estateManagement | password | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | + | estateClient | Estate Client | Secret1 | transactionProcessor | password | Given I have a token to access the estate management resource | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs b/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs index 911c5485..82fefab3 100644 --- a/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs @@ -111,139 +111,139 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table1 = new global::Reqnroll.Table(new string[] { "Role Name"}); - table61.AddRow(new string[] { + table1.AddRow(new string[] { "Estate"}); - table61.AddRow(new string[] { + table1.AddRow(new string[] { "Merchant"}); #line 6 - await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table61, "Given "); + await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table1, "Given "); #line hidden - global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table2 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table62.AddRow(new string[] { - "estateManagement", + table2.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST Scope", "A scope for Estate Managememt REST"}); #line 11 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table62, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table2, "Given "); #line hidden - global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table3 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table63.AddRow(new string[] { - "estateManagement", + table3.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST", "Secret1", - "estateManagement", + "transactionProcessor", "merchantId, estateId, role"}); #line 15 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table63, "Given "); + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table3, "Given "); #line hidden - global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table4 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table64.AddRow(new string[] { + table4.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement", + "transactionProcessor", "client_credentials"}); - table64.AddRow(new string[] { + table4.AddRow(new string[] { "estateClient", "Estate Client", "Secret1", - "estateManagement", + "transactionProcessor", "password"}); #line 19 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table64, "Given "); + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table4, "Given "); #line hidden - global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table65.AddRow(new string[] { + table5.AddRow(new string[] { "serviceClient"}); #line 24 - await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table65, "Given "); + await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table5, "Given "); #line hidden - global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table6 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table66.AddRow(new string[] { + table6.AddRow(new string[] { "Test Estate 1"}); - table66.AddRow(new string[] { + table6.AddRow(new string[] { "Test Estate 2"}); #line 28 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table66, "Given "); + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table6, "Given "); #line hidden - global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table7 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table67.AddRow(new string[] { + table7.AddRow(new string[] { "Test Estate 1", "Test Operator 1", "False", "False"}); - table67.AddRow(new string[] { + table7.AddRow(new string[] { "Test Estate 2", "Test Operator 1", "False", "False"}); #line 33 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table67, "Given "); + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table7, "Given "); #line hidden - global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table68.AddRow(new string[] { + table8.AddRow(new string[] { "Test Estate 1", "Test Operator 1"}); - table68.AddRow(new string[] { + table8.AddRow(new string[] { "Test Estate 2", "Test Operator 1"}); #line 38 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table68, "And "); + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table8, "And "); #line hidden - global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table69.AddRow(new string[] { + table9.AddRow(new string[] { "Test Estate 1", "Test Operator 1", "Safaricom Contract"}); #line 43 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table69, "Given "); + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table9, "Given "); #line hidden - global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table10 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", "FamilyName", "EstateName"}); - table70.AddRow(new string[] { + table10.AddRow(new string[] { "estateuser1@testestate1.co.uk", "123456", "TestEstate", "User1", "Test Estate 1"}); - table70.AddRow(new string[] { + table10.AddRow(new string[] { "estateuser1@testestate2.co.uk", "123456", "TestEstate", "User1", "Test Estate 2"}); #line 47 - await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table70, "Given "); + await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table10, "Given "); #line hidden } @@ -306,7 +306,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table11 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -317,7 +317,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "EmailAddress", "EstateName", "SettlementSchedule"}); - table71.AddRow(new string[] { + table11.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -329,9 +329,9 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 1", "Weekly"}); #line 56 - await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table71, "When "); + await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table11, "When "); #line hidden - global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] { "MerchantName", "MondayOpening", "MondayClosing", @@ -348,7 +348,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "SundayOpening", "SundayClosing", "EstateName"}); - table72.AddRow(new string[] { + table12.AddRow(new string[] { "Test Merchant 1", "0800", "1700", @@ -366,52 +366,52 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "1700", "Test Estate 1"}); #line 59 - await testRunner.WhenAsync("I set the following opening hours", ((string)(null)), table72, "When "); + await testRunner.WhenAsync("I set the following opening hours", ((string)(null)), table12, "When "); #line hidden - global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] { "MerchantName", "EstateName", "Year", "Month", "ClosedDays"}); - table73.AddRow(new string[] { + table13.AddRow(new string[] { "Test Merchant 1", "Test Estate 1", "2026", "1", "1"}); - table73.AddRow(new string[] { + table13.AddRow(new string[] { "Test Merchant 1", "Test Estate 1", "2026", "12", "25,26"}); #line 62 - await testRunner.WhenAsync("I create the following merchant schedules", ((string)(null)), table73, "When "); + await testRunner.WhenAsync("I create the following merchant schedules", ((string)(null)), table13, "When "); #line hidden - global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table74.AddRow(new string[] { + table14.AddRow(new string[] { "Test Operator 1", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); #line 66 - await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table74, "When "); + await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table14, "When "); #line hidden - global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", "FamilyName", "MerchantName", "EstateName"}); - table75.AddRow(new string[] { + table15.AddRow(new string[] { "merchantuser1@testmerchant1.co.uk", "123456", "TestMerchant", @@ -419,159 +419,159 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Merchant 1", "Test Estate 1"}); #line 69 - await testRunner.WhenAsync("I create the following security users", ((string)(null)), table75, "When "); + await testRunner.WhenAsync("I create the following security users", ((string)(null)), table15, "When "); #line hidden - global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table76.AddRow(new string[] { + table16.AddRow(new string[] { "TestDevice1", "Test Merchant 1", "Test Estate 1"}); #line 72 - await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table76, "When "); + await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table16, "When "); #line hidden - global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { "OriginalDeviceIdentifier", "NewDeviceIdentifier", "MerchantName", "EstateName"}); - table77.AddRow(new string[] { + table17.AddRow(new string[] { "TestDevice1", "TestDevice2", "Test Merchant 1", "Test Estate 1"}); #line 75 - await testRunner.WhenAsync("I swap the merchant device the device is swapped", ((string)(null)), table77, "When "); + await testRunner.WhenAsync("I swap the merchant device the device is swapped", ((string)(null)), table17, "When "); #line hidden - global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table78.AddRow(new string[] { + table18.AddRow(new string[] { "Deposit1", "500.00", "LastMonth", "Test Merchant 1", "Test Estate 1"}); - table78.AddRow(new string[] { + table18.AddRow(new string[] { "Deposit2", "1000.00", "LastWeek", "Test Merchant 1", "Test Estate 1"}); - table78.AddRow(new string[] { + table18.AddRow(new string[] { "Deposit3", "1000.00", "Yesterday", "Test Merchant 1", "Test Estate 1"}); - table78.AddRow(new string[] { + table18.AddRow(new string[] { "Deposit4", "400.00", "Today", "Test Merchant 1", "Test Estate 1"}); #line 78 - await testRunner.WhenAsync("I make the following manual merchant deposits", ((string)(null)), table78, "When "); + await testRunner.WhenAsync("I make the following manual merchant deposits", ((string)(null)), table18, "When "); #line hidden - global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", "EstateName"}); - table79.AddRow(new string[] { + table19.AddRow(new string[] { "400.00", "LastMonth", "Test Merchant 1", "Test Estate 1"}); #line 85 - await testRunner.WhenAsync("I make the following merchant withdrawals", ((string)(null)), table79, "When "); + await testRunner.WhenAsync("I make the following merchant withdrawals", ((string)(null)), table19, "When "); #line hidden - global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", "EstateName"}); - table80.AddRow(new string[] { + table20.AddRow(new string[] { "500.00", "LastMonth", "Test Merchant 1", "Test Estate 1"}); - table80.AddRow(new string[] { + table20.AddRow(new string[] { "1000.00", "LastWeek", "Test Merchant 1", "Test Estate 1"}); - table80.AddRow(new string[] { + table20.AddRow(new string[] { "1000.00", "Yesterday", "Test Merchant 1", "Test Estate 1"}); - table80.AddRow(new string[] { + table20.AddRow(new string[] { "400.00", "Today", "Test Merchant 1", "Test Estate 1"}); #line 89 - await testRunner.WhenAsync("I make the following automatic merchant deposits", ((string)(null)), table80, "When "); + await testRunner.WhenAsync("I make the following automatic merchant deposits", ((string)(null)), table20, "When "); #line hidden - global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", "EstateName"}); - table81.AddRow(new string[] { + table21.AddRow(new string[] { "0", "LastMonth", "Test Merchant 1", "Test Estate 1"}); #line 96 - await testRunner.WhenAsync("I make the following manual merchant deposits the deposit is rejected", ((string)(null)), table81, "When "); + await testRunner.WhenAsync("I make the following manual merchant deposits the deposit is rejected", ((string)(null)), table21, "When "); #line hidden - global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", "EstateName"}); - table82.AddRow(new string[] { + table22.AddRow(new string[] { "-100", "LastMonth", "Test Merchant 1", "Test Estate 1"}); #line 100 - await testRunner.WhenAsync("I make the following manual merchant deposits the deposit is rejected", ((string)(null)), table82, "When "); + await testRunner.WhenAsync("I make the following manual merchant deposits the deposit is rejected", ((string)(null)), table22, "When "); #line hidden - global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", "EstateName"}); - table83.AddRow(new string[] { + table23.AddRow(new string[] { "0", "LastMonth", "Test Merchant 1", "Test Estate 1"}); #line 104 - await testRunner.WhenAsync("I make the following automatic merchant deposits the deposit is rejected", ((string)(null)), table83, "When "); + await testRunner.WhenAsync("I make the following automatic merchant deposits the deposit is rejected", ((string)(null)), table23, "When "); #line hidden - global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", "EstateName"}); - table84.AddRow(new string[] { + table24.AddRow(new string[] { "-100", "LastMonth", "Test Merchant 1", "Test Estate 1"}); #line 108 - await testRunner.WhenAsync("I make the following automatic merchant deposits the deposit is rejected", ((string)(null)), table84, "When "); + await testRunner.WhenAsync("I make the following automatic merchant deposits the deposit is rejected", ((string)(null)), table24, "When "); #line hidden - global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -581,7 +581,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "ContactName", "EmailAddress", "EstateName"}); - table85.AddRow(new string[] { + table25.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -591,7 +591,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table85.AddRow(new string[] { + table25.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -601,7 +601,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table85.AddRow(new string[] { + table25.AddRow(new string[] { "Test Merchant 4", "Address Line 1", "TestTown", @@ -612,26 +612,26 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "testcontact1@merchant1.co.uk", "Test Estate 1"}); #line 112 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table85, "Given "); + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table25, "Given "); #line hidden - global::Reqnroll.Table table86 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "MerchantName", "EstateName", "SettlementSchedule"}); - table86.AddRow(new string[] { + table26.AddRow(new string[] { "Test Merchant 2", "Test Estate 1", "Immediate"}); - table86.AddRow(new string[] { + table26.AddRow(new string[] { "Test Merchant 3", "Test Estate 1", "Weekly"}); - table86.AddRow(new string[] { + table26.AddRow(new string[] { "Test Merchant 4", "Test Estate 1", "Monthly"}); #line 118 - await testRunner.WhenAsync("I set the merchants settlement schedule", ((string)(null)), table86, "When "); + await testRunner.WhenAsync("I set the merchants settlement schedule", ((string)(null)), table26, "When "); #line hidden } await this.ScenarioCleanupAsync(); @@ -662,7 +662,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -672,7 +672,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "ContactName", "EmailAddress", "EstateName"}); - table87.AddRow(new string[] { + table27.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -682,7 +682,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table87.AddRow(new string[] { + table27.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -692,7 +692,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant2.co.uk", "Test Estate 1"}); - table87.AddRow(new string[] { + table27.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -702,7 +702,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant3.co.uk", "Test Estate 1"}); - table87.AddRow(new string[] { + table27.AddRow(new string[] { "Test Merchant 4", "Address Line 1", "TestTown", @@ -712,7 +712,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Contact 1", "testcontact1@merchant4.co.uk", "Test Estate 2"}); - table87.AddRow(new string[] { + table27.AddRow(new string[] { "Test Merchant 5", "Address Line 1", "TestTown", @@ -723,110 +723,110 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "testcontact1@merchant5.co.uk", "Test Estate 2"}); #line 126 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table87, "Given "); + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table27, "Given "); #line hidden - global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table88.AddRow(new string[] { + table28.AddRow(new string[] { "Test Operator 1", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table88.AddRow(new string[] { + table28.AddRow(new string[] { "Test Operator 1", "Test Merchant 2", "00000001", "10000001", "Test Estate 1"}); - table88.AddRow(new string[] { + table28.AddRow(new string[] { "Test Operator 1", "Test Merchant 3", "00000001", "10000001", "Test Estate 1"}); - table88.AddRow(new string[] { + table28.AddRow(new string[] { "Test Operator 1", "Test Merchant 4", "00000001", "10000001", "Test Estate 2"}); - table88.AddRow(new string[] { + table28.AddRow(new string[] { "Test Operator 1", "Test Merchant 5", "00000001", "10000001", "Test Estate 2"}); #line 134 - await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table88, "When "); + await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table28, "When "); #line hidden - global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table89.AddRow(new string[] { + table29.AddRow(new string[] { "TestDevice1", "Test Merchant 1", "Test Estate 1"}); - table89.AddRow(new string[] { + table29.AddRow(new string[] { "TestDevice2", "Test Merchant 2", "Test Estate 1"}); - table89.AddRow(new string[] { + table29.AddRow(new string[] { "TestDevice3", "Test Merchant 3", "Test Estate 1"}); - table89.AddRow(new string[] { + table29.AddRow(new string[] { "TestDevice4", "Test Merchant 4", "Test Estate 2"}); - table89.AddRow(new string[] { + table29.AddRow(new string[] { "TestDevice5", "Test Merchant 5", "Test Estate 2"}); #line 142 - await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table89, "When "); + await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table29, "When "); #line hidden - global::Reqnroll.Table table90 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", "FamilyName", "MerchantName", "EstateName"}); - table90.AddRow(new string[] { + table30.AddRow(new string[] { "merchantuser1@testmerchant1.co.uk", "123456", "TestMerchant", "User1", "Test Merchant 1", "Test Estate 1"}); - table90.AddRow(new string[] { + table30.AddRow(new string[] { "merchantuser1@testmerchant2.co.uk", "123456", "TestMerchant", "User1", "Test Merchant 2", "Test Estate 1"}); - table90.AddRow(new string[] { + table30.AddRow(new string[] { "merchantuser1@testmerchant3.co.uk", "123456", "TestMerchant", "User1", "Test Merchant 3", "Test Estate 1"}); - table90.AddRow(new string[] { + table30.AddRow(new string[] { "merchantuser1@testmerchant4.co.uk", "123456", "TestMerchant", "User1", "Test Merchant 4", "Test Estate 2"}); - table90.AddRow(new string[] { + table30.AddRow(new string[] { "merchantuser1@testmerchant5.co.uk", "123456", "TestMerchant", @@ -834,7 +834,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Merchant 5", "Test Estate 2"}); #line 150 - await testRunner.WhenAsync("I create the following security users", ((string)(null)), table90, "When "); + await testRunner.WhenAsync("I create the following security users", ((string)(null)), table30, "When "); #line hidden #line 158 await testRunner.WhenAsync("I get the merchants for \'Test Estate 1\' then 3 merchants will be returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); @@ -871,7 +871,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table91 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -882,7 +882,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "EmailAddress", "EstateName", "SettlementSchedule"}); - table91.AddRow(new string[] { + table31.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -894,31 +894,31 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 1", "Weekly"}); #line 164 - await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table91, "When "); + await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table31, "When "); #line hidden - global::Reqnroll.Table table92 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table92.AddRow(new string[] { + table32.AddRow(new string[] { "Test Operator 1", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); #line 167 - await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table92, "When "); + await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table32, "When "); #line hidden - global::Reqnroll.Table table93 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", "FamilyName", "MerchantName", "EstateName"}); - table93.AddRow(new string[] { + table33.AddRow(new string[] { "merchantuser1@testmerchant1.co.uk", "123456", "TestMerchant", @@ -926,44 +926,44 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Merchant 1", "Test Estate 1"}); #line 170 - await testRunner.WhenAsync("I create the following security users", ((string)(null)), table93, "When "); + await testRunner.WhenAsync("I create the following security users", ((string)(null)), table33, "When "); #line hidden - global::Reqnroll.Table table94 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table34 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table94.AddRow(new string[] { + table34.AddRow(new string[] { "TestDevice1", "Test Merchant 1", "Test Estate 1"}); #line 173 - await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table94, "When "); + await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table34, "When "); #line hidden - global::Reqnroll.Table table95 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table95.AddRow(new string[] { + table35.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); #line 176 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table95, "When "); + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table35, "When "); #line hidden - global::Reqnroll.Table table96 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { "UpdateMerchantName", "SettlementSchedule", "EstateName", "MerchantName"}); - table96.AddRow(new string[] { + table36.AddRow(new string[] { "Update Merchant 1", "Monthly", "Test Estate 1", "Test Merchant 1"}); #line 179 - await testRunner.WhenAsync("I update the merchants with the following details", ((string)(null)), table96, "When "); + await testRunner.WhenAsync("I update the merchants with the following details", ((string)(null)), table36, "When "); #line hidden - global::Reqnroll.Table table97 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { "AddressLine1", "AddressLine2", "AddressLine3", @@ -974,7 +974,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Country", "EstateName", "MerchantName"}); - table97.AddRow(new string[] { + table37.AddRow(new string[] { "Address Line 1U", "Address Line 2", "Address Line 3", @@ -986,35 +986,35 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa "Test Estate 1", "Test Merchant 1"}); #line 182 - await testRunner.WhenAsync("I update the merchants address with the following details", ((string)(null)), table97, "When "); + await testRunner.WhenAsync("I update the merchants address with the following details", ((string)(null)), table37, "When "); #line hidden - global::Reqnroll.Table table98 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { "ContactName", "EmailAddress", "PhoneNumber", "EstateName", "MerchantName"}); - table98.AddRow(new string[] { + table38.AddRow(new string[] { "Test Contact 1U", "testcontact1update@merchant1.co.uk", "12345678", "Test Estate 1", "Test Merchant 1"}); #line 185 - await testRunner.WhenAsync("I update the merchants contact with the following details", ((string)(null)), table98, "When "); + await testRunner.WhenAsync("I update the merchants contact with the following details", ((string)(null)), table38, "When "); #line hidden - global::Reqnroll.Table table99 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { "OriginalDeviceIdentifier", "NewDeviceIdentifier", "MerchantName", "EstateName"}); - table99.AddRow(new string[] { + table39.AddRow(new string[] { "TestDevice1", "TestDevice2", "Test Merchant 1", "Test Estate 1"}); #line 188 - await testRunner.WhenAsync("I swap the merchant device the device is swapped", ((string)(null)), table99, "When "); + await testRunner.WhenAsync("I swap the merchant device the device is swapped", ((string)(null)), table39, "When "); #line hidden #line 191 await testRunner.WhenAsync("I remove the contract \'Safaricom Contract\' from merchant \'Test Merchant 1\' on \'Te" + diff --git a/TransactionProcessor.IntegrationTests/Features/Operator.feature b/TransactionProcessor.IntegrationTests/Features/Operator.feature index ce740fdc..d1dc6b4b 100644 --- a/TransactionProcessor.IntegrationTests/Features/Operator.feature +++ b/TransactionProcessor.IntegrationTests/Features/Operator.feature @@ -8,16 +8,15 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | + | transactionProcessor | Estate Managememt REST Scope | A scope for Estate Managememt REST | Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | merchantId, estateId, role | - + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | merchantId, estateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement | client_credentials | - | estateClient | Estate Client | Secret1 | estateManagement | password | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | + | estateClient | Estate Client | Secret1 | transactionProcessor | password | Given I have a token to access the estate management resource | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs b/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs index 6d8b41f1..ded3c306 100644 --- a/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs @@ -111,73 +111,73 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table100 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table1 = new global::Reqnroll.Table(new string[] { "Role Name"}); - table100.AddRow(new string[] { + table1.AddRow(new string[] { "Estate"}); #line 5 - await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table100, "Given "); + await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table1, "Given "); #line hidden - global::Reqnroll.Table table101 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table2 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table101.AddRow(new string[] { - "estateManagement", + table2.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST Scope", "A scope for Estate Managememt REST"}); #line 9 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table101, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table2, "Given "); #line hidden - global::Reqnroll.Table table102 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table3 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table102.AddRow(new string[] { - "estateManagement", + table3.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST", "Secret1", - "estateManagement", + "transactionProcessor", "merchantId, estateId, role"}); #line 13 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table102, "Given "); + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table3, "Given "); #line hidden - global::Reqnroll.Table table103 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table4 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table103.AddRow(new string[] { + table4.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement", + "transactionProcessor", "client_credentials"}); - table103.AddRow(new string[] { + table4.AddRow(new string[] { "estateClient", "Estate Client", "Secret1", - "estateManagement", + "transactionProcessor", "password"}); -#line 17 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table103, "Given "); +#line 16 + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table4, "Given "); #line hidden - global::Reqnroll.Table table104 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table104.AddRow(new string[] { + table5.AddRow(new string[] { "serviceClient"}); -#line 22 - await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table104, "Given "); +#line 21 + await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table5, "Given "); #line hidden - global::Reqnroll.Table table105 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table6 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table105.AddRow(new string[] { + table6.AddRow(new string[] { "Test Estate 1"}); -#line 26 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table105, "Given "); +#line 25 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table6, "Given "); #line hidden } @@ -198,7 +198,7 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Update Operator", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 31 +#line 30 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -211,59 +211,59 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table106 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table7 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber", "OperatorId"}); - table106.AddRow(new string[] { + table7.AddRow(new string[] { "Test Estate 1", "Test Operator 1", "True", "True", "27C722F6-208F-4F78-9A2F-993F8A8F24A3"}); - table106.AddRow(new string[] { + table7.AddRow(new string[] { "Test Estate 1", "Test Operator 2", "True", "True", "00000000-0000-0000-0000-000000000000"}); -#line 33 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table106, "Given "); +#line 32 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table7, "Given "); #line hidden - global::Reqnroll.Table table107 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { "UpdateOperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber", "EstateName", "OperatorName"}); - table107.AddRow(new string[] { + table8.AddRow(new string[] { "Update Operator 1", "False", "False", "Test Estate 1", "Test Operator 1"}); -#line 38 - await testRunner.WhenAsync("I update the operators with the following details", ((string)(null)), table107, "When "); +#line 37 + await testRunner.WhenAsync("I update the operators with the following details", ((string)(null)), table8, "When "); #line hidden - global::Reqnroll.Table table108 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table108.AddRow(new string[] { + table9.AddRow(new string[] { "Test Estate 1", "Update Operator 1", "False", "False"}); - table108.AddRow(new string[] { + table9.AddRow(new string[] { "Test Estate 1", "Test Operator 2", "True", "True"}); -#line 42 - await testRunner.WhenAsync("I get all the operators the following details are returned", ((string)(null)), table108, "When "); +#line 41 + await testRunner.WhenAsync("I get all the operators the following details are returned", ((string)(null)), table9, "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature b/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature index bbdc6e16..06a8024b 100644 --- a/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature +++ b/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature @@ -6,17 +6,15 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | - | voucherManagement | Voucher Management REST Scope | A scope for Voucher Management REST | + | transactionProcessor | Estate Managememt REST Scope | A scope for Estate Managememt REST | Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role | - | voucherManagement | Voucher Management REST | Secret1 | voucherManagement | | + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | MerchantId, EstateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement,voucherManagement | client_credentials | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | Given I have a token to access the estate management and transaction processor resources | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs b/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs index 421652fc..caf8bffe 100644 --- a/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs @@ -111,108 +111,98 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 5 #line hidden - global::Reqnroll.Table table125 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table125.AddRow(new string[] { - "estateManagement", + table40.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST Scope", "A scope for Estate Managememt REST"}); - table125.AddRow(new string[] { - "voucherManagement", - "Voucher Management REST Scope", - "A scope for Voucher Management REST"}); #line 7 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table125, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table40, "Given "); #line hidden - global::Reqnroll.Table table126 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table126.AddRow(new string[] { - "estateManagement", + table41.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST", "Secret1", - "estateManagement", + "transactionProcessor", "MerchantId, EstateId, role"}); - table126.AddRow(new string[] { - "voucherManagement", - "Voucher Management REST", - "Secret1", - "voucherManagement", - ""}); -#line 12 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table126, "Given "); +#line 11 + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table41, "Given "); #line hidden - global::Reqnroll.Table table127 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table127.AddRow(new string[] { + table42.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement,voucherManagement", + "transactionProcessor", "client_credentials"}); -#line 17 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table127, "Given "); +#line 15 + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table42, "Given "); #line hidden - global::Reqnroll.Table table128 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table128.AddRow(new string[] { + table43.AddRow(new string[] { "serviceClient"}); -#line 21 +#line 19 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table128, "Given "); + "s", ((string)(null)), table43, "Given "); #line hidden - global::Reqnroll.Table table129 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table129.AddRow(new string[] { + table44.AddRow(new string[] { "Test Estate 1"}); - table129.AddRow(new string[] { + table44.AddRow(new string[] { "Test Estate 2"}); -#line 25 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table129, "Given "); +#line 23 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table44, "Given "); #line hidden - global::Reqnroll.Table table130 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table130.AddRow(new string[] { + table45.AddRow(new string[] { "Test Estate 1", "Voucher", "False", "False"}); -#line 30 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table130, "Given "); +#line 28 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table45, "Given "); #line hidden - global::Reqnroll.Table table131 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table131.AddRow(new string[] { + table46.AddRow(new string[] { "Test Estate 1", "Voucher"}); -#line 34 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table131, "And "); +#line 32 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table46, "And "); #line hidden - global::Reqnroll.Table table132 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table132.AddRow(new string[] { + table47.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); -#line 38 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table132, "Given "); +#line 36 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table47, "Given "); #line hidden - global::Reqnroll.Table table133 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -220,7 +210,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table133.AddRow(new string[] { + table48.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -228,10 +218,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); -#line 42 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table133, "When "); +#line 40 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table48, "When "); #line hidden - global::Reqnroll.Table table134 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -241,7 +231,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table134.AddRow(new string[] { + table49.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -251,62 +241,62 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); -#line 46 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table134, "Given "); +#line 44 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table49, "Given "); #line hidden - global::Reqnroll.Table table135 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table135.AddRow(new string[] { + table50.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); -#line 50 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table135, "Given "); +#line 48 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table50, "Given "); #line hidden - global::Reqnroll.Table table136 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table136.AddRow(new string[] { + table51.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); -#line 54 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table136, "Given "); +#line 52 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table51, "Given "); #line hidden - global::Reqnroll.Table table137 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table137.AddRow(new string[] { + table52.AddRow(new string[] { "Deposit1", "20.00", "Today", "Test Merchant 1", "Test Estate 1"}); -#line 58 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table137, "Given "); +#line 56 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table52, "Given "); #line hidden - global::Reqnroll.Table table138 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table138.AddRow(new string[] { + table53.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); -#line 62 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table138, "When "); +#line 60 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table53, "When "); #line hidden - global::Reqnroll.Table table139 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -325,7 +315,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "MessageType", "AccountNumber", "CustomerName"}); - table139.AddRow(new string[] { + table54.AddRow(new string[] { "Today", "1", "Sale", @@ -344,8 +334,8 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); -#line 66 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table139, "When "); +#line 64 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table54, "When "); #line hidden } @@ -366,7 +356,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Redeem Vouchers", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 72 +#line 70 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -379,7 +369,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 5 await this.FeatureBackgroundAsync(); #line hidden -#line 73 +#line 71 await testRunner.WhenAsync("I redeem the voucher for Estate \'Test Estate 1\' and Merchant \'Test Merchant 1\' tr" + "ansaction number 1 the voucher balance will be 0", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden diff --git a/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature b/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature index 19d3cf25..b36ef2c8 100644 --- a/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature +++ b/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature @@ -5,21 +5,17 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | | transactionProcessor | Transaction Processor REST Scope | A scope for Transaction Processor REST | - | voucherManagement | Voucher Management REST Scope | A scope for Voucher Management REST | | messagingService | Scope for Messaging REST | Scope for Messaging REST | Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role | - | transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | | - | voucherManagement | Voucher Management REST | Secret1 | voucherManagement | | + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | MerchantId, EstateId, role | | messagingService | Messaging REST | Secret | messagingService | | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement,transactionProcessor,voucherManagement,messagingService | client_credentials | + | serviceClient | Service Client | Secret1 | transactionProcessor,messagingService | client_credentials | Given I have a token to access the estate management and transaction processor resources | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs b/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs index 37148a85..3723880c 100644 --- a/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs @@ -111,199 +111,179 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table140 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table140.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST Scope", - "A scope for Estate Managememt REST"}); - table140.AddRow(new string[] { + table45.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); - table140.AddRow(new string[] { - "voucherManagement", - "Voucher Management REST Scope", - "A scope for Voucher Management REST"}); - table140.AddRow(new string[] { + table45.AddRow(new string[] { "messagingService", "Scope for Messaging REST", "Scope for Messaging REST"}); #line 6 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table140, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table45, "Given "); #line hidden - global::Reqnroll.Table table141 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table141.AddRow(new string[] { - "estateManagement", + table46.AddRow(new string[] { + "transactionProcessor", "Estate Managememt REST", "Secret1", "estateManagement", "MerchantId, EstateId, role"}); - table141.AddRow(new string[] { - "transactionProcessor", - "Transaction Processor REST", - "Secret1", - "transactionProcessor", - ""}); - table141.AddRow(new string[] { - "voucherManagement", - "Voucher Management REST", - "Secret1", - "voucherManagement", - ""}); - table141.AddRow(new string[] { + table46.AddRow(new string[] { "messagingService", "Messaging REST", "Secret", "messagingService", ""}); -#line 13 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table141, "Given "); +#line 11 + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table46, "Given "); #line hidden - global::Reqnroll.Table table142 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table142.AddRow(new string[] { + table47.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement,transactionProcessor,voucherManagement,messagingService", + "transactionProcessor,messagingService", "client_credentials"}); -#line 20 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table142, "Given "); +#line 16 + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table47, "Given "); #line hidden - global::Reqnroll.Table table143 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table143.AddRow(new string[] { + table48.AddRow(new string[] { "serviceClient"}); -#line 24 +#line 20 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table143, "Given "); + "s", ((string)(null)), table48, "Given "); #line hidden - global::Reqnroll.Table table144 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { "AccountNumber", "AccountName", "DueDate", "Amount"}); - table144.AddRow(new string[] { + table49.AddRow(new string[] { "12345678", "Test Account 1", "Today", "100.00"}); -#line 28 - await testRunner.GivenAsync("the following bills are available at the PataPawa PostPaid Host", ((string)(null)), table144, "Given "); +#line 24 + await testRunner.GivenAsync("the following bills are available at the PataPawa PostPaid Host", ((string)(null)), table49, "Given "); #line hidden - global::Reqnroll.Table table145 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { "Username", "Password"}); - table145.AddRow(new string[] { + table50.AddRow(new string[] { "operatora", "1234567898"}); -#line 32 - await testRunner.GivenAsync("the following users are available at the PataPawa PrePay Host", ((string)(null)), table145, "Given "); +#line 28 + await testRunner.GivenAsync("the following users are available at the PataPawa PrePay Host", ((string)(null)), table50, "Given "); #line hidden - global::Reqnroll.Table table146 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { "MeterNumber", "CustomerName"}); - table146.AddRow(new string[] { + table51.AddRow(new string[] { "00000001", "Customer 1"}); - table146.AddRow(new string[] { + table51.AddRow(new string[] { "00000002", "Customer 2"}); - table146.AddRow(new string[] { + table51.AddRow(new string[] { "00000003", "Customer 3"}); -#line 36 - await testRunner.GivenAsync("the following meters are available at the PataPawa PrePay Host", ((string)(null)), table146, "Given "); +#line 32 + await testRunner.GivenAsync("the following meters are available at the PataPawa PrePay Host", ((string)(null)), table51, "Given "); #line hidden - global::Reqnroll.Table table147 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table147.AddRow(new string[] { + table52.AddRow(new string[] { "Test Estate 1"}); -#line 42 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table147, "Given "); +#line 38 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table52, "Given "); #line hidden - global::Reqnroll.Table table148 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table148.AddRow(new string[] { + table53.AddRow(new string[] { "Test Estate 1", "Safaricom", "False", "False"}); - table148.AddRow(new string[] { + table53.AddRow(new string[] { "Test Estate 1", "Voucher", "False", "False"}); - table148.AddRow(new string[] { + table53.AddRow(new string[] { "Test Estate 1", "PataPawa PostPay", "False", "False"}); - table148.AddRow(new string[] { + table53.AddRow(new string[] { "Test Estate 1", "PataPawa PrePay", "False", "False"}); -#line 46 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table148, "Given "); +#line 42 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table53, "Given "); #line hidden - global::Reqnroll.Table table149 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table149.AddRow(new string[] { + table54.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table149.AddRow(new string[] { + table54.AddRow(new string[] { "Test Estate 1", "Voucher"}); - table149.AddRow(new string[] { + table54.AddRow(new string[] { "Test Estate 1", "PataPawa PostPay"}); - table149.AddRow(new string[] { + table54.AddRow(new string[] { "Test Estate 1", "PataPawa PrePay"}); -#line 53 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table149, "And "); +#line 49 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table54, "And "); #line hidden - global::Reqnroll.Table table150 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table150.AddRow(new string[] { + table55.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table150.AddRow(new string[] { + table55.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); - table150.AddRow(new string[] { + table55.AddRow(new string[] { "Test Estate 1", "PataPawa PostPay", "PataPawa PostPay Contract"}); - table150.AddRow(new string[] { + table55.AddRow(new string[] { "Test Estate 1", "PataPawa PrePay", "PataPawa PrePay Contract"}); -#line 60 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table150, "Given "); +#line 56 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table55, "Given "); #line hidden - global::Reqnroll.Table table151 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -311,7 +291,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table151.AddRow(new string[] { + table56.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -319,7 +299,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table151.AddRow(new string[] { + table56.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -327,7 +307,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); - table151.AddRow(new string[] { + table56.AddRow(new string[] { "Test Estate 1", "PataPawa PostPay", "PataPawa PostPay Contract", @@ -335,7 +315,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Bill Pay (Post)", "", "BillPayment"}); - table151.AddRow(new string[] { + table56.AddRow(new string[] { "Test Estate 1", "PataPawa PrePay", "PataPawa PrePay Contract", @@ -343,10 +323,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Bill Pay (Pre)", "", "BillPayment"}); -#line 67 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table151, "When "); +#line 63 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table56, "When "); #line hidden - global::Reqnroll.Table table152 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -354,7 +334,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CalculationType", "FeeDescription", "Value"}); - table152.AddRow(new string[] { + table57.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -362,7 +342,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Percentage", "Merchant Commission", "0.50"}); - table152.AddRow(new string[] { + table57.AddRow(new string[] { "Test Estate 1", "PataPawa PostPay", "PataPawa PostPay Contract", @@ -370,7 +350,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Percentage", "Merchant Commission", "0.50"}); - table152.AddRow(new string[] { + table57.AddRow(new string[] { "Test Estate 1", "PataPawa PrePay", "PataPawa PrePay Contract", @@ -378,10 +358,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Percentage", "Merchant Commission", "0.50"}); -#line 74 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table152, "When "); +#line 70 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table57, "When "); #line hidden - global::Reqnroll.Table table153 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -391,7 +371,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table153.AddRow(new string[] { + table58.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -401,7 +381,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table153.AddRow(new string[] { + table58.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -411,7 +391,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 2", "testcontact2@merchant2.co.uk", "Test Estate 1"}); - table153.AddRow(new string[] { + table58.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -421,7 +401,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 3", "testcontact3@merchant3.co.uk", "Test Estate 1"}); - table153.AddRow(new string[] { + table58.AddRow(new string[] { "Test Merchant 4", "Address Line 1", "TestTown", @@ -431,240 +411,240 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 4", "testcontact4@merchant4.co.uk", "Test Estate 1"}); -#line 80 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table153, "Given "); +#line 76 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table58, "Given "); #line hidden - global::Reqnroll.Table table154 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PostPay", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PrePay", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Safaricom", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Voucher", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PostPay", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PrePay", "Test Merchant 2", "00000001", "10000001", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Safaricom", "Test Merchant 3", "00000003", "10000003", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Voucher", "Test Merchant 3", "00000003", "10000003", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PostPay", "Test Merchant 3", "00000003", "10000003", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PrePay", "Test Merchant 3", "00000001", "10000001", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Safaricom", "Test Merchant 4", "00000004", "10000004", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "Voucher", "Test Merchant 4", "00000004", "10000004", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PostPay", "Test Merchant 4", "00000004", "10000004", "Test Estate 1"}); - table154.AddRow(new string[] { + table59.AddRow(new string[] { "PataPawa PrePay", "Test Merchant 4", "00000001", "10000001", "Test Estate 1"}); -#line 87 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table154, "Given "); +#line 83 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table59, "Given "); #line hidden - global::Reqnroll.Table table155 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table155.AddRow(new string[] { + table60.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); - table155.AddRow(new string[] { + table60.AddRow(new string[] { "123456781", "Test Merchant 2", "Test Estate 1"}); - table155.AddRow(new string[] { + table60.AddRow(new string[] { "123456782", "Test Merchant 3", "Test Estate 1"}); - table155.AddRow(new string[] { + table60.AddRow(new string[] { "123456783", "Test Merchant 4", "Test Estate 1"}); -#line 106 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table155, "Given "); +#line 102 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table60, "Given "); #line hidden - global::Reqnroll.Table table156 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table156.AddRow(new string[] { + table61.AddRow(new string[] { "Deposit1", "265.00", "Today", "Test Merchant 1", "Test Estate 1"}); - table156.AddRow(new string[] { + table61.AddRow(new string[] { "Deposit1", "110.00", "Today", "Test Merchant 2", "Test Estate 1"}); - table156.AddRow(new string[] { + table61.AddRow(new string[] { "Deposit1", "110.00", "Today", "Test Merchant 3", "Test Estate 1"}); - table156.AddRow(new string[] { + table61.AddRow(new string[] { "Deposit1", "100.00", "Today", "Test Merchant 4", "Test Estate 1"}); -#line 113 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table156, "Given "); +#line 109 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table61, "Given "); #line hidden - global::Reqnroll.Table table157 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "PataPawa PostPay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "PataPawa PrePay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Safaricom Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Hospital 1 Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "PataPawa PostPay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "PataPawa PrePay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "Safaricom Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "Hospital 1 Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "PataPawa PostPay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "PataPawa PrePay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 4", "Safaricom Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 4", "Hospital 1 Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 4", "PataPawa PostPay Contract"}); - table157.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Test Merchant 4", "PataPawa PrePay Contract"}); -#line 120 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table157, "When "); +#line 116 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table62, "When "); #line hidden } @@ -685,7 +665,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Sale Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 140 +#line 136 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -698,7 +678,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table158 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -718,7 +698,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "AccountNumber", "CustomerName", "MeterNumber"}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "1", "Sale", @@ -738,7 +718,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "2", "Sale", @@ -758,7 +738,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "3", "Sale", @@ -778,7 +758,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "4", "Sale", @@ -798,7 +778,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "5", "Sale", @@ -818,7 +798,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "6", "Sale", @@ -838,7 +818,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "7", "Sale", @@ -858,7 +838,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "8", "Sale", @@ -878,7 +858,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "12345678", "", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "9", "Sale", @@ -898,7 +878,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "12345678", "Mr Test Customer", ""}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "10", "Sale", @@ -918,7 +898,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "", "00000001"}); - table158.AddRow(new string[] { + table63.AddRow(new string[] { "Today", "11", "Sale", @@ -938,85 +918,85 @@ await testRunner.GivenAsync("I have a token to access the estate management and "00000001", "Customer 1", "00000001"}); -#line 142 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table158, "When "); +#line 138 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table63, "When "); #line hidden - global::Reqnroll.Table table159 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "2", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "3", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "4", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "5", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "6", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "7", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "9", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "10", "0000", "SUCCESS"}); - table159.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "11", "0000", "SUCCESS"}); -#line 156 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table159, "Then "); +#line 152 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table64, "Then "); #line hidden - global::Reqnroll.Table table160 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { "DateTime", "Reference", "EntryType", @@ -1024,7 +1004,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Out", "ChangeAmount", "Balance"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Merchant Deposit", "C", @@ -1032,7 +1012,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.00", "265.00", "230.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1040,7 +1020,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "110.00", "110.00", "130.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1048,7 +1028,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "90.00", "90.00", "30.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1056,7 +1036,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10.00", "10.00", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1064,7 +1044,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "20.00", "20.00", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1072,7 +1052,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "20.00", "25.00", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Fee Processed", "C", @@ -1080,7 +1060,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.55", "0.55", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Fee Processed", "C", @@ -1088,7 +1068,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.45", "0.45", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Fee Processed", "C", @@ -1096,7 +1076,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.01", "0.10", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Transaction Fee Processed", "C", @@ -1104,7 +1084,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.01", "0.10", "20.00"}); - table160.AddRow(new string[] { + table65.AddRow(new string[] { "Today", "Opening Balance", "C", @@ -1112,11 +1092,11 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.00", "0.00", "20.00"}); -#line 170 +#line 166 await testRunner.ThenAsync("the following entries appear in the merchants balance history for estate \'Test Es" + - "tate 1\' and merchant \'Test Merchant 1\'", ((string)(null)), table160, "Then "); + "tate 1\' and merchant \'Test Merchant 1\'", ((string)(null)), table65, "Then "); #line hidden - global::Reqnroll.Table table161 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { "DateTime", "Reference", "EntryType", @@ -1124,7 +1104,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Out", "ChangeAmount", "Balance"}); - table161.AddRow(new string[] { + table66.AddRow(new string[] { "Today", "Merchant Deposit", "C", @@ -1132,7 +1112,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.00", "110.00", "230.00"}); - table161.AddRow(new string[] { + table66.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1140,7 +1120,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "100.00", "100.00", "130.00"}); - table161.AddRow(new string[] { + table66.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1148,7 +1128,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10.00", "10.00", "30.00"}); - table161.AddRow(new string[] { + table66.AddRow(new string[] { "Today", "Transaction Fee Processed", "C", @@ -1156,7 +1136,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.50", "0.50", "20.00"}); - table161.AddRow(new string[] { + table66.AddRow(new string[] { "Today", "Opening Balance", "C", @@ -1164,11 +1144,11 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.00", "0.00", "20.00"}); -#line 184 +#line 180 await testRunner.ThenAsync("the following entries appear in the merchants balance history for estate \'Test Es" + - "tate 1\' and merchant \'Test Merchant 2\'", ((string)(null)), table161, "Then "); + "tate 1\' and merchant \'Test Merchant 2\'", ((string)(null)), table66, "Then "); #line hidden - global::Reqnroll.Table table162 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { "DateTime", "Reference", "EntryType", @@ -1176,7 +1156,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Out", "ChangeAmount", "Balance"}); - table162.AddRow(new string[] { + table67.AddRow(new string[] { "Today", "Merchant Deposit", "C", @@ -1184,7 +1164,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.00", "110.00", "230.00"}); - table162.AddRow(new string[] { + table67.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1192,7 +1172,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "100.00", "100.00", "130.00"}); - table162.AddRow(new string[] { + table67.AddRow(new string[] { "Today", "Transaction Completed", "D", @@ -1200,7 +1180,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10.00", "10.00", "30.00"}); - table162.AddRow(new string[] { + table67.AddRow(new string[] { "Today", "Transaction Fee Processed", "C", @@ -1208,7 +1188,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.85", "0.50", "20.00"}); - table162.AddRow(new string[] { + table67.AddRow(new string[] { "Today", "Opening Balance", "C", @@ -1216,22 +1196,22 @@ await testRunner.GivenAsync("I have a token to access the estate management and "0.00", "0.00", "20.00"}); -#line 192 +#line 188 await testRunner.ThenAsync("the following entries appear in the merchants balance history for estate \'Test Es" + - "tate 1\' and merchant \'Test Merchant 3\'", ((string)(null)), table162, "Then "); + "tate 1\' and merchant \'Test Merchant 3\'", ((string)(null)), table67, "Then "); #line hidden - global::Reqnroll.Table table163 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber"}); - table163.AddRow(new string[] { + table68.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1"}); -#line 200 - await testRunner.WhenAsync("I request the receipt is resent", ((string)(null)), table163, "When "); +#line 196 + await testRunner.WhenAsync("I request the receipt is resent", ((string)(null)), table68, "When "); #line hidden - global::Reqnroll.Table table164 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1245,7 +1225,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table164.AddRow(new string[] { + table69.AddRow(new string[] { "Today", "12", "Sale", @@ -1259,25 +1239,25 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "Safaricom Contract", "Variable Topup"}); -#line 204 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table164, "When "); +#line 200 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table69, "When "); #line hidden - global::Reqnroll.Table table165 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table165.AddRow(new string[] { + table70.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "12", "1000", "Device Identifier 123456781 not valid for Merchant Test Merchant 1"}); -#line 208 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table165, "Then "); +#line 204 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table70, "Then "); #line hidden - global::Reqnroll.Table table166 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1291,7 +1271,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table166.AddRow(new string[] { + table71.AddRow(new string[] { "Today", "13", "Sale", @@ -1305,25 +1285,25 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "Safaricom Contract", "Variable Topup"}); -#line 212 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table166, "When "); +#line 208 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table71, "When "); #line hidden - global::Reqnroll.Table table167 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table167.AddRow(new string[] { + table72.AddRow(new string[] { "InvalidEstate", "Test Merchant 1", "13", "1001", "Estate Id [79902550-64df-4491-b0c1-4e78943928a3] is not a valid estate"}); -#line 216 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table167, "Then "); +#line 212 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table72, "Then "); #line hidden - global::Reqnroll.Table table168 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1337,7 +1317,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table168.AddRow(new string[] { + table73.AddRow(new string[] { "Today", "14", "Sale", @@ -1351,26 +1331,26 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "Safaricom Contract", "Variable Topup"}); -#line 220 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table168, "When "); +#line 216 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table73, "When "); #line hidden - global::Reqnroll.Table table169 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table169.AddRow(new string[] { + table74.AddRow(new string[] { "Test Estate 1", "InvalidMerchant", "14", "1002", "Merchant Id [d59320fa-4c3e-4900-a999-483f6a10c69a] is not a valid merchant for es" + "tate [Test Estate 1]"}); -#line 224 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table169, "Then "); +#line 220 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table74, "Then "); #line hidden - global::Reqnroll.Table table170 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1384,7 +1364,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table170.AddRow(new string[] { + table75.AddRow(new string[] { "Today", "15", "Sale", @@ -1398,26 +1378,26 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "EmptyContract", "Variable Topup"}); -#line 228 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table170, "When "); +#line 224 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table75, "When "); #line hidden - global::Reqnroll.Table table171 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table171.AddRow(new string[] { + table76.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "15", "1012", "Contract Id [00000000-0000-0000-0000-000000000000] must be set for a sale transac" + "tion"}); -#line 232 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table171, "Then "); +#line 228 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table76, "Then "); #line hidden - global::Reqnroll.Table table172 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1431,7 +1411,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table172.AddRow(new string[] { + table77.AddRow(new string[] { "Today", "16", "Sale", @@ -1445,26 +1425,26 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "InvalidContract", "Variable Topup"}); -#line 236 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table172, "When "); +#line 232 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table77, "When "); #line hidden - global::Reqnroll.Table table173 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table173.AddRow(new string[] { + table78.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "16", "1015", "Contract Id [934d8164-f36a-448e-b27b-4d671d41d180] not valid for Merchant [Test M" + "erchant 1]"}); -#line 240 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table173, "Then "); +#line 236 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table78, "Then "); #line hidden - global::Reqnroll.Table table174 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1478,7 +1458,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table174.AddRow(new string[] { + table79.AddRow(new string[] { "Today", "17", "Sale", @@ -1492,26 +1472,26 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "Safaricom Contract", "EmptyProduct"}); -#line 244 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table174, "When "); +#line 240 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table79, "When "); #line hidden - global::Reqnroll.Table table175 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table175.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "17", "1013", "Product Id [00000000-0000-0000-0000-000000000000] must be set for a sale transact" + "ion"}); -#line 248 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table175, "Then "); +#line 244 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table80, "Then "); #line hidden - global::Reqnroll.Table table176 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1525,7 +1505,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table176.AddRow(new string[] { + table81.AddRow(new string[] { "Today", "18", "Sale", @@ -1539,26 +1519,26 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "Safaricom Contract", "InvalidProduct"}); -#line 252 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table176, "When "); +#line 248 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table81, "When "); #line hidden - global::Reqnroll.Table table177 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table177.AddRow(new string[] { + table82.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "18", "1016", "Product Id [934d8164-f36a-448e-b27b-4d671d41d180] not valid for Merchant [Test Me" + "rchant 1]"}); -#line 256 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table177, "Then "); +#line 252 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table82, "Then "); #line hidden - global::Reqnroll.Table table178 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1572,7 +1552,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table178.AddRow(new string[] { + table83.AddRow(new string[] { "Today", "19", "Sale", @@ -1586,24 +1566,24 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcustomer@customer.co.uk", "Safaricom Contract", "Variable Topup"}); -#line 260 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table178, "When "); +#line 256 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table83, "When "); #line hidden - global::Reqnroll.Table table179 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table179.AddRow(new string[] { + table84.AddRow(new string[] { "Test Estate 1", "Test Merchant 4", "19", "1009", "Merchant [Test Merchant 4] does not have enough credit available [100.00] to perf" + "orm transaction amount [300.00]"}); -#line 264 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table179, "Then "); +#line 260 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table84, "Then "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/Settlement.feature b/TransactionProcessor.IntegrationTests/Features/Settlement.feature index 660f5657..5123c22d 100644 --- a/TransactionProcessor.IntegrationTests/Features/Settlement.feature +++ b/TransactionProcessor.IntegrationTests/Features/Settlement.feature @@ -5,19 +5,15 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | | transactionProcessor | Transaction Processor REST Scope | A scope for Transaction Processor REST | - | voucherManagement | Voucher Management REST Scope | A scope for Voucher Management REST | - + Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role | - | transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | | - | voucherManagement | Voucher Management REST | Secret1 | voucherManagement | | + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | MerchantId, EstateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement,transactionProcessor,voucherManagement | client_credentials | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | Given I have a token to access the estate management and transaction processor resources | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs b/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs index 430b498c..9ca19c60 100644 --- a/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs @@ -111,128 +111,108 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table180 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table180.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST Scope", - "A scope for Estate Managememt REST"}); - table180.AddRow(new string[] { + table55.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); - table180.AddRow(new string[] { - "voucherManagement", - "Voucher Management REST Scope", - "A scope for Voucher Management REST"}); #line 6 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table180, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table55, "Given "); #line hidden - global::Reqnroll.Table table181 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table181.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST", - "Secret1", - "estateManagement", - "MerchantId, EstateId, role"}); - table181.AddRow(new string[] { + table56.AddRow(new string[] { "transactionProcessor", - "Transaction Processor REST", + "Estate Managememt REST", "Secret1", "transactionProcessor", - ""}); - table181.AddRow(new string[] { - "voucherManagement", - "Voucher Management REST", - "Secret1", - "voucherManagement", - ""}); -#line 12 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table181, "Given "); + "MerchantId, EstateId, role"}); +#line 10 + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table56, "Given "); #line hidden - global::Reqnroll.Table table182 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table182.AddRow(new string[] { + table57.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement,transactionProcessor,voucherManagement", + "transactionProcessor", "client_credentials"}); -#line 18 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table182, "Given "); +#line 14 + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table57, "Given "); #line hidden - global::Reqnroll.Table table183 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table183.AddRow(new string[] { + table58.AddRow(new string[] { "serviceClient"}); -#line 22 +#line 18 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table183, "Given "); + "s", ((string)(null)), table58, "Given "); #line hidden - global::Reqnroll.Table table184 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table184.AddRow(new string[] { + table59.AddRow(new string[] { "Test Estate 1"}); -#line 26 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table184, "Given "); +#line 22 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table59, "Given "); #line hidden - global::Reqnroll.Table table185 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table185.AddRow(new string[] { + table60.AddRow(new string[] { "Test Estate 1", "Safaricom", "False", "False"}); - table185.AddRow(new string[] { + table60.AddRow(new string[] { "Test Estate 1", "Voucher", "False", "False"}); -#line 30 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table185, "Given "); +#line 26 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table60, "Given "); #line hidden - global::Reqnroll.Table table186 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table186.AddRow(new string[] { + table61.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table186.AddRow(new string[] { + table61.AddRow(new string[] { "Test Estate 1", "Voucher"}); -#line 35 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table186, "And "); +#line 31 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table61, "And "); #line hidden - global::Reqnroll.Table table187 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table187.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table187.AddRow(new string[] { + table62.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); -#line 40 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table187, "Given "); +#line 36 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table62, "Given "); #line hidden - global::Reqnroll.Table table188 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -240,7 +220,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table188.AddRow(new string[] { + table63.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -248,7 +228,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table188.AddRow(new string[] { + table63.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -256,10 +236,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); -#line 45 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table188, "When "); +#line 41 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table63, "When "); #line hidden - global::Reqnroll.Table table189 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -267,7 +247,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CalculationType", "FeeDescription", "Value"}); - table189.AddRow(new string[] { + table64.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -275,8 +255,8 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Fixed", "Merchant Commission", "2.50"}); -#line 50 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table189, "When "); +#line 46 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table64, "When "); #line hidden } @@ -295,7 +275,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Pending Settlement", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 54 +#line 50 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -308,7 +288,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table190 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -319,7 +299,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "EmailAddress", "EstateName", "SettlementSchedule"}); - table190.AddRow(new string[] { + table65.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -330,7 +310,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact1@merchant1.co.uk", "Test Estate 1", "Immediate"}); - table190.AddRow(new string[] { + table65.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -341,7 +321,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact2@merchant2.co.uk", "Test Estate 1", "Weekly"}); - table190.AddRow(new string[] { + table65.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -352,132 +332,132 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact3@merchant2.co.uk", "Test Estate 1", "Monthly"}); -#line 55 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table190, "Given "); +#line 51 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table65, "Given "); #line hidden - global::Reqnroll.Table table191 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table191.AddRow(new string[] { + table66.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table191.AddRow(new string[] { + table66.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table191.AddRow(new string[] { + table66.AddRow(new string[] { "Safaricom", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table191.AddRow(new string[] { + table66.AddRow(new string[] { "Voucher", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table191.AddRow(new string[] { + table66.AddRow(new string[] { "Safaricom", "Test Merchant 3", "00000003", "10000003", "Test Estate 1"}); - table191.AddRow(new string[] { + table66.AddRow(new string[] { "Voucher", "Test Merchant 3", "00000003", "10000003", "Test Estate 1"}); -#line 61 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table191, "Given "); +#line 57 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table66, "Given "); #line hidden - global::Reqnroll.Table table192 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table192.AddRow(new string[] { + table67.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); - table192.AddRow(new string[] { + table67.AddRow(new string[] { "123456781", "Test Merchant 2", "Test Estate 1"}); - table192.AddRow(new string[] { + table67.AddRow(new string[] { "123456782", "Test Merchant 3", "Test Estate 1"}); -#line 70 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table192, "Given "); +#line 66 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table67, "Given "); #line hidden - global::Reqnroll.Table table193 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table193.AddRow(new string[] { + table68.AddRow(new string[] { "Deposit1", "210.00", "Today", "Test Merchant 1", "Test Estate 1"}); - table193.AddRow(new string[] { + table68.AddRow(new string[] { "Deposit1", "110.00", "Today", "Test Merchant 2", "Test Estate 1"}); - table193.AddRow(new string[] { + table68.AddRow(new string[] { "Deposit1", "120.00", "Today", "Test Merchant 3", "Test Estate 1"}); -#line 76 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table193, "Given "); +#line 72 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table68, "Given "); #line hidden - global::Reqnroll.Table table194 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table194.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table194.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); - table194.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Safaricom Contract"}); - table194.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Hospital 1 Contract"}); - table194.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "Safaricom Contract"}); - table194.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "Hospital 1 Contract"}); -#line 82 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table194, "When "); +#line 78 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table69, "When "); #line hidden - global::Reqnroll.Table table195 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -493,7 +473,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ProductName", "RecipientEmail", "RecipientMobile"}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "1", "Sale", @@ -509,7 +489,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "2", "Sale", @@ -525,7 +505,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "3", "Sale", @@ -541,7 +521,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "4", "Sale", @@ -557,7 +537,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "5", "Sale", @@ -573,7 +553,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "test@recipient.co.uk", ""}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "6", "Sale", @@ -589,7 +569,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "123456789"}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "7", "Sale", @@ -605,7 +585,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "test@recipient.co.uk", ""}); - table195.AddRow(new string[] { + table70.AddRow(new string[] { "2022-01-06", "8", "Sale", @@ -621,96 +601,96 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "test@recipient.co.uk", ""}); -#line 91 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table195, "When "); +#line 87 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table70, "When "); #line hidden - global::Reqnroll.Table table196 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "2", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "3", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "4", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "5", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "6", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "7", "0000", "SUCCESS"}); - table196.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 3", "8", "0000", "SUCCESS"}); -#line 102 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table196, "Then "); +#line 98 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table71, "Then "); #line hidden - global::Reqnroll.Table table197 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", "NumberOfFees"}); - table197.AddRow(new string[] { + table72.AddRow(new string[] { "2022-01-13", "Test Estate 1", "Test Merchant 2", "1"}); - table197.AddRow(new string[] { + table72.AddRow(new string[] { "2022-02-06", "Test Estate 1", "Test Merchant 3", "1"}); -#line 113 - await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table197, "When "); +#line 109 + await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table72, "When "); #line hidden - global::Reqnroll.Table table198 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", "NumberOfFees"}); - table198.AddRow(new string[] { + table73.AddRow(new string[] { "2022-01-06", "Test Estate 1", "Test Merchant 1", "2"}); -#line 118 - await testRunner.WhenAsync("I get the completed settlements the following information should be returned", ((string)(null)), table198, "When "); +#line 114 + await testRunner.WhenAsync("I get the completed settlements the following information should be returned", ((string)(null)), table73, "When "); #line hidden } await this.ScenarioCleanupAsync(); @@ -728,7 +708,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Settlement", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 123 +#line 119 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -741,7 +721,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table199 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -752,7 +732,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "EmailAddress", "EstateName", "SettlementSchedule"}); - table199.AddRow(new string[] { + table74.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -763,7 +743,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact1@merchant1.co.uk", "Test Estate 1", "Immediate"}); - table199.AddRow(new string[] { + table74.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -774,102 +754,102 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact2@merchant2.co.uk", "Test Estate 1", "Weekly"}); -#line 124 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table199, "Given "); +#line 120 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table74, "Given "); #line hidden - global::Reqnroll.Table table200 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table200.AddRow(new string[] { + table75.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table200.AddRow(new string[] { + table75.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table200.AddRow(new string[] { + table75.AddRow(new string[] { "Safaricom", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table200.AddRow(new string[] { + table75.AddRow(new string[] { "Voucher", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); -#line 129 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table200, "Given "); +#line 125 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table75, "Given "); #line hidden - global::Reqnroll.Table table201 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table201.AddRow(new string[] { + table76.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); - table201.AddRow(new string[] { + table76.AddRow(new string[] { "123456781", "Test Merchant 2", "Test Estate 1"}); -#line 136 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table201, "Given "); +#line 132 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table76, "Given "); #line hidden - global::Reqnroll.Table table202 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table202.AddRow(new string[] { + table77.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table202.AddRow(new string[] { + table77.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); - table202.AddRow(new string[] { + table77.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Safaricom Contract"}); - table202.AddRow(new string[] { + table77.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Hospital 1 Contract"}); -#line 141 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table202, "When "); +#line 137 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table77, "When "); #line hidden - global::Reqnroll.Table table203 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table203.AddRow(new string[] { + table78.AddRow(new string[] { "Deposit1", "210.00", "Today", "Test Merchant 1", "Test Estate 1"}); - table203.AddRow(new string[] { + table78.AddRow(new string[] { "Deposit1", "110.00", "Today", "Test Merchant 2", "Test Estate 1"}); -#line 148 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table203, "Given "); +#line 144 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table78, "Given "); #line hidden - global::Reqnroll.Table table204 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -885,7 +865,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ProductName", "RecipientEmail", "RecipientMobile"}); - table204.AddRow(new string[] { + table79.AddRow(new string[] { "2022-01-06", "1", "Sale", @@ -901,7 +881,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table204.AddRow(new string[] { + table79.AddRow(new string[] { "2022-01-06", "2", "Sale", @@ -917,7 +897,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table204.AddRow(new string[] { + table79.AddRow(new string[] { "2022-01-06", "4", "Sale", @@ -933,7 +913,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Variable Topup", "", ""}); - table204.AddRow(new string[] { + table79.AddRow(new string[] { "2022-01-06", "5", "Sale", @@ -949,7 +929,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "test@recipient.co.uk", ""}); - table204.AddRow(new string[] { + table79.AddRow(new string[] { "2022-01-06", "6", "Sale", @@ -965,62 +945,62 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "123456789"}); -#line 153 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table204, "When "); +#line 149 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table79, "When "); #line hidden - global::Reqnroll.Table table205 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table205.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1", "0000", "SUCCESS"}); - table205.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "2", "0000", "SUCCESS"}); - table205.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "4", "0000", "SUCCESS"}); - table205.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "5", "0000", "SUCCESS"}); - table205.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "6", "0000", "SUCCESS"}); -#line 161 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table205, "Then "); +#line 157 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table80, "Then "); #line hidden - global::Reqnroll.Table table206 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", "NumberOfFees"}); - table206.AddRow(new string[] { + table81.AddRow(new string[] { "2022-01-13", "Test Estate 1", "Test Merchant 2", "1"}); -#line 169 - await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table206, "When "); +#line 165 + await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table81, "When "); #line hidden -#line 173 +#line 169 await testRunner.WhenAsync("I process the settlement for \'2022-01-13\' on Estate \'Test Estate 1\' for Merchant " + "\'Test Merchant 2\' then 1 fees are marked as settled and the settlement is comple" + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); diff --git a/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature b/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature index 749e1f07..b3e296db 100644 --- a/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature +++ b/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature @@ -5,17 +5,15 @@ Background: Given I create the following api scopes | Name | DisplayName | Description | - | estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST | | transactionProcessor | Transaction Processor REST Scope | A scope for Transaction Processor REST | Given the following api resources exist | Name | DisplayName | Secret | Scopes | UserClaims | - | estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role | - | transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | | + | transactionProcessor | Estate Managememt REST | Secret1 | transactionProcessor | MerchantId, EstateId, role | Given the following clients exist | ClientId | ClientName | Secret | Scopes | GrantTypes | - | serviceClient | Service Client | Secret1 | estateManagement,transactionProcessor | client_credentials | + | serviceClient | Service Client | Secret1 | transactionProcessor | client_credentials | Given I have a token to access the estate management and transaction processor resources | ClientId | diff --git a/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs b/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs index 36d19dfa..7be85b31 100644 --- a/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs @@ -111,120 +111,110 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table207 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table207.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST Scope", - "A scope for Estate Managememt REST"}); - table207.AddRow(new string[] { + table82.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); #line 6 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table207, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table82, "Given "); #line hidden - global::Reqnroll.Table table208 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table208.AddRow(new string[] { - "estateManagement", - "Estate Managememt REST", - "Secret1", - "estateManagement", - "MerchantId, EstateId, role"}); - table208.AddRow(new string[] { + table83.AddRow(new string[] { "transactionProcessor", - "Transaction Processor REST", + "Estate Managememt REST", "Secret1", "transactionProcessor", - ""}); -#line 11 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table208, "Given "); + "MerchantId, EstateId, role"}); +#line 10 + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table83, "Given "); #line hidden - global::Reqnroll.Table table209 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table209.AddRow(new string[] { + table84.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", - "estateManagement,transactionProcessor", + "transactionProcessor", "client_credentials"}); -#line 16 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table209, "Given "); +#line 14 + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table84, "Given "); #line hidden - global::Reqnroll.Table table210 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table210.AddRow(new string[] { + table85.AddRow(new string[] { "serviceClient"}); -#line 20 +#line 18 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table210, "Given "); + "s", ((string)(null)), table85, "Given "); #line hidden - global::Reqnroll.Table table211 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table86 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table211.AddRow(new string[] { + table86.AddRow(new string[] { "Test Estate 1"}); - table211.AddRow(new string[] { + table86.AddRow(new string[] { "Test Estate 2"}); -#line 24 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table211, "Given "); +#line 22 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table86, "Given "); #line hidden - global::Reqnroll.Table table212 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table212.AddRow(new string[] { + table87.AddRow(new string[] { "Test Estate 1", "Safaricom", "False", "False"}); - table212.AddRow(new string[] { + table87.AddRow(new string[] { "Test Estate 2", "Safaricom", "False", "False"}); -#line 29 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table212, "Given "); +#line 27 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table87, "Given "); #line hidden - global::Reqnroll.Table table213 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table213.AddRow(new string[] { + table88.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table213.AddRow(new string[] { + table88.AddRow(new string[] { "Test Estate 2", "Safaricom"}); -#line 34 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table213, "And "); +#line 32 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table88, "And "); #line hidden - global::Reqnroll.Table table214 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table214.AddRow(new string[] { + table89.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table214.AddRow(new string[] { + table89.AddRow(new string[] { "Test Estate 2", "Safaricom", "Safaricom Contract"}); -#line 39 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table214, "Given "); +#line 37 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table89, "Given "); #line hidden - global::Reqnroll.Table table215 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table90 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -232,7 +222,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table215.AddRow(new string[] { + table90.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -240,7 +230,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table215.AddRow(new string[] { + table90.AddRow(new string[] { "Test Estate 2", "Safaricom", "Safaricom Contract", @@ -248,10 +238,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); -#line 44 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table215, "When "); +#line 42 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table90, "When "); #line hidden - global::Reqnroll.Table table216 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table91 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -260,7 +250,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "FeeDescription", "Value", "FeeType"}); - table216.AddRow(new string[] { + table91.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -269,7 +259,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Merchant Commission", "0.50", "Merchant"}); - table216.AddRow(new string[] { + table91.AddRow(new string[] { "Test Estate 2", "Safaricom", "Safaricom Contract", @@ -278,10 +268,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Merchant Commission", "0.85", "Merchant"}); -#line 49 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table216, "When "); +#line 47 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table91, "When "); #line hidden - global::Reqnroll.Table table217 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table92 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -292,7 +282,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "EmailAddress", "EstateName", "SettlementSchedule"}); - table217.AddRow(new string[] { + table92.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -303,7 +293,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact1@merchant1.co.uk", "Test Estate 1", "Weekly"}); - table217.AddRow(new string[] { + table92.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -314,7 +304,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact2@merchant2.co.uk", "Test Estate 1", "Weekly"}); - table217.AddRow(new string[] { + table92.AddRow(new string[] { "Test Merchant 3", "Address Line 1", "TestTown", @@ -325,102 +315,102 @@ await testRunner.GivenAsync("I have a token to access the estate management and "testcontact3@merchant2.co.uk", "Test Estate 2", "Monthly"}); -#line 54 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table217, "Given "); +#line 52 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table92, "Given "); #line hidden - global::Reqnroll.Table table218 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table93 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table218.AddRow(new string[] { + table93.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table218.AddRow(new string[] { + table93.AddRow(new string[] { "Safaricom", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table218.AddRow(new string[] { + table93.AddRow(new string[] { "Safaricom", "Test Merchant 3", "00000003", "10000003", "Test Estate 2"}); -#line 60 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table218, "Given "); +#line 58 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table93, "Given "); #line hidden - global::Reqnroll.Table table219 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table94 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table219.AddRow(new string[] { + table94.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); - table219.AddRow(new string[] { + table94.AddRow(new string[] { "123456781", "Test Merchant 2", "Test Estate 1"}); - table219.AddRow(new string[] { + table94.AddRow(new string[] { "123456782", "Test Merchant 3", "Test Estate 2"}); -#line 66 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table219, "Given "); +#line 64 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table94, "Given "); #line hidden - global::Reqnroll.Table table220 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table95 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table220.AddRow(new string[] { + table95.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table220.AddRow(new string[] { + table95.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Safaricom Contract"}); - table220.AddRow(new string[] { + table95.AddRow(new string[] { "Test Estate 2", "Test Merchant 3", "Safaricom Contract"}); -#line 72 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table220, "When "); +#line 70 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table95, "When "); #line hidden - global::Reqnroll.Table table221 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table96 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table221.AddRow(new string[] { + table96.AddRow(new string[] { "Deposit1", "50000.00", "Today", "Test Merchant 1", "Test Estate 1"}); - table221.AddRow(new string[] { + table96.AddRow(new string[] { "Deposit1", "50000.00", "Today", "Test Merchant 2", "Test Estate 1"}); - table221.AddRow(new string[] { + table96.AddRow(new string[] { "Deposit1", "50000.00", "Today", "Test Merchant 3", "Test Estate 2"}); -#line 78 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table221, "Given "); +#line 76 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table96, "Given "); #line hidden - global::Reqnroll.Table table222 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table97 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -434,7 +424,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CustomerEmailAddress", "ContractDescription", "ProductName"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "1", "Sale", @@ -448,7 +438,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "2", "Sale", @@ -462,7 +452,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "3", "Sale", @@ -476,7 +466,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "4", "Sale", @@ -490,7 +480,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "5", "Sale", @@ -504,7 +494,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "6", "Sale", @@ -518,7 +508,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "7", "Sale", @@ -532,7 +522,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "8", "Sale", @@ -546,7 +536,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "1", "Sale", @@ -560,7 +550,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "2", "Sale", @@ -574,7 +564,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "3", "Sale", @@ -588,7 +578,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "4", "Sale", @@ -602,7 +592,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); - table222.AddRow(new string[] { + table97.AddRow(new string[] { "2022-01-06", "1", "Sale", @@ -616,138 +606,138 @@ await testRunner.GivenAsync("I have a token to access the estate management and "", "Safaricom Contract", "Variable Topup"}); -#line 84 - await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table222, "When "); +#line 82 + await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table97, "When "); #line hidden - global::Reqnroll.Table table223 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table98 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", "ResponseCode", "ResponseMessage"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "1", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "2", "1008", "DECLINED BY OPERATOR"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "3", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "4", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "5", "1008", "DECLINED BY OPERATOR"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "6", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "7", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "1", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "2", "1008", "DECLINED BY OPERATOR"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "3", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "4", "0000", "SUCCESS"}); - table223.AddRow(new string[] { + table98.AddRow(new string[] { "Test Estate 2", "Test Merchant 3", "1", "0000", "SUCCESS"}); -#line 102 - await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table223, "Then "); +#line 100 + await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table98, "Then "); #line hidden - global::Reqnroll.Table table224 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table99 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", "NumberOfFees"}); - table224.AddRow(new string[] { + table99.AddRow(new string[] { "2022-01-13", "Test Estate 1", "Test Merchant 1", "6"}); - table224.AddRow(new string[] { + table99.AddRow(new string[] { "2022-01-13", "Test Estate 1", "Test Merchant 2", "3"}); -#line 120 - await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table224, "When "); +#line 118 + await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table99, "When "); #line hidden -#line 125 +#line 123 await testRunner.WhenAsync("I process the settlement for \'2022-01-13\' on Estate \'Test Estate 1\' for Merchant " + "\'Test Merchant 1\' then 6 fees are marked as settled and the settlement is comple" + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden -#line 127 +#line 125 await testRunner.WhenAsync("I process the settlement for \'2022-01-13\' on Estate \'Test Estate 1\' for Merchant " + "\'Test Merchant 2\' then 3 fees are marked as settled and the settlement is comple" + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden - global::Reqnroll.Table table225 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table100 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", "NumberOfFees"}); - table225.AddRow(new string[] { + table100.AddRow(new string[] { "2022-02-06", "Test Estate 2", "Test Merchant 3", "1"}); -#line 129 - await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table225, "When "); +#line 127 + await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table100, "When "); #line hidden -#line 133 +#line 131 await testRunner.WhenAsync("I process the settlement for \'2022-02-06\' on Estate \'Test Estate 2\' for Merchant " + "\'Test Merchant 3\' then 1 fees are marked as settled and the settlement is comple" + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); @@ -773,7 +763,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Settlements - Merchant Filter", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 137 +#line 135 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -786,127 +776,127 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table226 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table101 = new global::Reqnroll.Table(new string[] { "SettlementDate", "NumberOfFeesSettled", "ValueOfFeesSettled", "IsCompleted"}); - table226.AddRow(new string[] { + table101.AddRow(new string[] { "2022-01-13", "6", "2.39", "True"}); -#line 138 +#line 136 await testRunner.WhenAsync("I get the Estate Settlement Report for Estate \'Test Estate 1\' for Merchant \'Test " + "Merchant 1\' with the Start Date \'2022-01-13\' and the End Date \'2022-02-06\' the f" + - "ollowing data is returned", ((string)(null)), table226, "When "); + "ollowing data is returned", ((string)(null)), table101, "When "); #line hidden - global::Reqnroll.Table table227 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table102 = new global::Reqnroll.Table(new string[] { "SettlementDate", "NumberOfFeesSettled", "ValueOfFeesSettled", "IsCompleted"}); - table227.AddRow(new string[] { + table102.AddRow(new string[] { "2022-01-13", "3", "0.71", "True"}); -#line 142 +#line 140 await testRunner.WhenAsync("I get the Estate Settlement Report for Estate \'Test Estate 1\' for Merchant \'Test " + "Merchant 2\' with the Start Date \'2022-01-13\' and the End Date \'2022-02-06\' the f" + - "ollowing data is returned", ((string)(null)), table227, "When "); + "ollowing data is returned", ((string)(null)), table102, "When "); #line hidden - global::Reqnroll.Table table228 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table103 = new global::Reqnroll.Table(new string[] { "SettlementDate", "NumberOfFeesSettled", "ValueOfFeesSettled", "IsCompleted"}); - table228.AddRow(new string[] { + table103.AddRow(new string[] { "2022-02-06", "1", "0.85", "True"}); -#line 146 +#line 144 await testRunner.WhenAsync("I get the Estate Settlement Report for Estate \'Test Estate 2\' for Merchant \'Test " + "Merchant 3\' with the Start Date \'2022-01-13\' and the End Date \'2022-02-06\' the f" + - "ollowing data is returned", ((string)(null)), table228, "When "); + "ollowing data is returned", ((string)(null)), table103, "When "); #line hidden - global::Reqnroll.Table table229 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table104 = new global::Reqnroll.Table(new string[] { "FeeDescription", "IsSettled", "Operator", "CalculatedValue"}); - table229.AddRow(new string[] { + table104.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.50"}); - table229.AddRow(new string[] { + table104.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.13"}); - table229.AddRow(new string[] { + table104.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.75"}); - table229.AddRow(new string[] { + table104.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.20"}); - table229.AddRow(new string[] { + table104.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.30"}); - table229.AddRow(new string[] { + table104.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.51"}); -#line 150 +#line 148 await testRunner.WhenAsync("I get the Estate Settlement Report for Estate \'Test Estate 1\' for Merchant \'Test " + - "Merchant 1\' with the Date \'2022-01-13\' the following fees are settled", ((string)(null)), table229, "When "); + "Merchant 1\' with the Date \'2022-01-13\' the following fees are settled", ((string)(null)), table104, "When "); #line hidden - global::Reqnroll.Table table230 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table105 = new global::Reqnroll.Table(new string[] { "FeeDescription", "IsSettled", "Operator", "CalculatedValue"}); - table230.AddRow(new string[] { + table105.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.50"}); - table230.AddRow(new string[] { + table105.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.13"}); - table230.AddRow(new string[] { + table105.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.08"}); -#line 159 +#line 157 await testRunner.WhenAsync("I get the Estate Settlement Report for Estate \'Test Estate 1\' for Merchant \'Test " + - "Merchant 2\' with the Date \'2022-01-13\' the following fees are settled", ((string)(null)), table230, "When "); + "Merchant 2\' with the Date \'2022-01-13\' the following fees are settled", ((string)(null)), table105, "When "); #line hidden - global::Reqnroll.Table table231 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table106 = new global::Reqnroll.Table(new string[] { "FeeDescription", "IsSettled", "Operator", "CalculatedValue"}); - table231.AddRow(new string[] { + table106.AddRow(new string[] { "Merchant Commission", "True", "Safaricom", "0.85"}); -#line 165 +#line 163 await testRunner.WhenAsync("I get the Estate Settlement Report for Estate \'Test Estate 2\' for Merchant \'Test " + - "Merchant 3\' with the Date \'2022-02-06\' the following fees are settled", ((string)(null)), table231, "When "); + "Merchant 3\' with the Date \'2022-02-06\' the following fees are settled", ((string)(null)), table106, "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.Testing/TestData.cs b/TransactionProcessor.Testing/TestData.cs index 9db65983..025eb718 100644 --- a/TransactionProcessor.Testing/TestData.cs +++ b/TransactionProcessor.Testing/TestData.cs @@ -727,6 +727,7 @@ public static Dictionary AdditionalTransactionMetaDataForPataPaw ["AppSettings:UseConnectionStringConfig"] = "false", ["EventStoreSettings:ConnectionString"] = "esdb://127.0.0.1:2113", ["SecurityConfiguration:Authority"] = "https://127.0.0.1", + ["SecurityConfiguration:ApiName"] = "ApiName", ["AppSettings:EstateManagementApi"] = "http://127.0.0.1", ["AppSettings:SecurityService"] = "http://127.0.0.1", ["AppSettings:ContractProductFeeCacheExpiryInHours"] = "", diff --git a/TransactionProcessor.Tests/General/BootstrapperTests.cs b/TransactionProcessor.Tests/General/BootstrapperTests.cs index dec26ab5..eeb24dc4 100644 --- a/TransactionProcessor.Tests/General/BootstrapperTests.cs +++ b/TransactionProcessor.Tests/General/BootstrapperTests.cs @@ -19,26 +19,6 @@ public class BootstrapperTests { #region Methods - /// - /// Verifies the bootstrapper is valid. - /// - [Fact] - public void VerifyBootstrapperIsValid() - { - Mock hostingEnvironment = new Mock(); - hostingEnvironment.Setup(he => he.EnvironmentName).Returns("Development"); - hostingEnvironment.Setup(he => he.ContentRootPath).Returns("/home"); - hostingEnvironment.Setup(he => he.ApplicationName).Returns("Test Application"); - - ServiceRegistry services = new ServiceRegistry(); - Startup s = new Startup(hostingEnvironment.Object); - Startup.Configuration = this.SetupMemoryConfiguration(); - - this.AddTestRegistrations(services, hostingEnvironment.Object); - s.ConfigureContainer(services); - Startup.Container.AssertConfigurationIsValid(AssertMode.Full); - } - [Fact] public void ConfigureContainer_PopulatesAutoApiLogonOperators_WithoutDuplicates() { @@ -78,6 +58,7 @@ private IConfigurationRoot SetupMemoryConfiguration() configuration.Add("AppSettings:VoucherManagementApi", "http://localhost"); configuration.Add("AppSettings:SecurityService", "http://localhost"); configuration.Add("SecurityConfiguration:Authority", "http://localhost"); + configuration.Add("SecurityConfiguration:ApiName", "ApiName"); configuration.Add("ConnectionStrings:TransactionProcessorReadModel", "dbconnstring"); configuration.Add("OperatorConfiguration:Safaricom:ApiLogonRequired", "true"); configuration.Add("OperatorConfiguration:PataPawaPostPay:ApiLogonRequired", "true"); diff --git a/TransactionProcessor/Bootstrapper/MiddlewareRegistry.cs b/TransactionProcessor/Bootstrapper/MiddlewareRegistry.cs index 5a1053dd..561f31ff 100644 --- a/TransactionProcessor/Bootstrapper/MiddlewareRegistry.cs +++ b/TransactionProcessor/Bootstrapper/MiddlewareRegistry.cs @@ -2,6 +2,7 @@ using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Tokens; using Microsoft.OpenApi; +using OpenIddict.Validation.AspNetCore; namespace TransactionProcessor.Bootstrapper { @@ -14,6 +15,7 @@ namespace TransactionProcessor.Bootstrapper using Microsoft.Extensions.Diagnostics.HealthChecks; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; + using OpenIddict.Abstractions; using Shared.Authorisation; using Shared.EventStore.Extensions; using Shared.Extensions; @@ -62,32 +64,35 @@ private String GetSecurityServiceConfigValue(String keyName) { private void ConfigureAuthentication() { IdentityModelEventSource.ShowPII = true; - this.AddAuthentication(options => - { - options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; - }).AddJwtBearer(options => - { - options.BackchannelHttpHandler = new HttpClientHandler - { - ServerCertificateCustomValidationCallback = (message, - certificate, - chain, - sslPolicyErrors) => true - }; - options.Authority = GetSecurityServiceConfigValue("Authority"); - options.Audience = GetSecurityServiceConfigValue("ApiName"); - - options.TokenValidationParameters = new TokenValidationParameters - { - ValidateAudience = false, - ValidAudience = GetSecurityServiceConfigValue("ApiName"), - ValidIssuer = GetSecurityServiceConfigValue("Authority"), - }; - options.IncludeErrorDetails = true; - }); + { + options.DefaultScheme = OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme; + }); + + this.AddOpenIddict() + .AddValidation(options => + { + // Same as your Authority + options.SetIssuer(new Uri(ConfigurationReader.GetValue("SecurityConfiguration", "Authority"))); + + // Enables discovery and HTTP backchannel support + options.UseSystemNetHttp() + .ConfigureHttpClientHandler(handler => + { + // DEV ONLY: bypass all certificate errors + handler.ServerCertificateCustomValidationCallback = + HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; + }); + + // Register the ASP.NET Core integration + options.UseAspNetCore(); + + // Optionally set expected audience(s): + options.AddAudiences(ConfigurationReader.GetValue("SecurityConfiguration", "ApiName")); + + }); + + this.AddAuthorization(); } private void ConfigureAuthorization() diff --git a/TransactionProcessor/TransactionProcessor.csproj b/TransactionProcessor/TransactionProcessor.csproj index 839b5fb8..0d01ff8e 100644 --- a/TransactionProcessor/TransactionProcessor.csproj +++ b/TransactionProcessor/TransactionProcessor.csproj @@ -10,6 +10,8 @@ + +