From 376670352e397a6e8877bed5c018c40d0f95f5bb Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Mon, 17 Mar 2025 10:46:04 +0000 Subject: [PATCH 1/3] wip --- ...ansactionProcessor.Aggregates.Tests.csproj | 14 +- .../TransactionProcessor.Aggregates.csproj | 3 +- ...actionProcessor.BusinessLogic.Tests.csproj | 22 +- .../TransactionProcessor.BusinessLogic.csproj | 18 +- .../TransactionProcessor.Client.csproj | 4 +- ...actionProcessor.DataTransferObjects.csproj | 1 + .../TransactionProcessor.Database.csproj | 23 +- .../TransactionProcessor.DomainEvents.csproj | 2 +- ...rocessor.IntegrationTesting.Helpers.csproj | 7 +- .../Features/Contract.feature.cs | 89 ++-- .../Features/Estate.feature.cs | 87 ++-- .../Features/LogonTransaction.feature.cs | 77 ++-- .../Features/Merchant.feature.cs | 165 +++---- .../Features/Operator.feature.cs | 55 ++- .../Features/ReconciliationFeature.feature.cs | 69 +-- .../Features/RedeemVoucher.feature.cs | 69 +-- .../SaleTransactionFeature.feature.cs | 117 ++--- .../Features/Settlement.feature.cs | 97 +++-- .../Features/SettlementReporting.feature.cs | 93 ++-- ...ansactionProcessor.IntegrationTests.csproj | 26 +- ...ionProcessor.ProjectionEngine.Tests.csproj | 18 +- ...ansactionProcessor.ProjectionEngine.csproj | 10 +- .../TransactionProcessor.Repository.csproj | 16 +- .../TransactionProcessor.Testing.csproj | 4 +- .../TransactionProcessor.Tests.csproj | 22 +- .../TransactionProcessor.csproj | 39 +- TransactionProcessor/appsettings.json | 402 +++++------------- 27 files changed, 739 insertions(+), 810 deletions(-) diff --git a/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj b/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj index 9ddfb280..3287a329 100644 --- a/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj +++ b/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj @@ -10,14 +10,18 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj b/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj index aa93abe2..e4a08cf7 100644 --- a/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj +++ b/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj @@ -7,7 +7,8 @@ - + + diff --git a/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj b/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj index 1b357293..e9204b31 100644 --- a/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj +++ b/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj @@ -7,20 +7,22 @@ - - - - - + + + + + + + - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj b/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj index bf122138..bfa172b6 100644 --- a/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj +++ b/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj @@ -5,22 +5,24 @@ - - - + + + + + - - - - + + + + - + diff --git a/TransactionProcessor.Client/TransactionProcessor.Client.csproj b/TransactionProcessor.Client/TransactionProcessor.Client.csproj index 4f75d56f..6fc85191 100644 --- a/TransactionProcessor.Client/TransactionProcessor.Client.csproj +++ b/TransactionProcessor.Client/TransactionProcessor.Client.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj b/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj index 44da5063..febb7e86 100644 --- a/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj +++ b/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj @@ -10,6 +10,7 @@ + diff --git a/TransactionProcessor.Database/TransactionProcessor.Database.csproj b/TransactionProcessor.Database/TransactionProcessor.Database.csproj index e14f9d7a..1cdfbb83 100644 --- a/TransactionProcessor.Database/TransactionProcessor.Database.csproj +++ b/TransactionProcessor.Database/TransactionProcessor.Database.csproj @@ -8,20 +8,21 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + + diff --git a/TransactionProcessor.DomainEvents/TransactionProcessor.DomainEvents.csproj b/TransactionProcessor.DomainEvents/TransactionProcessor.DomainEvents.csproj index 987bd7ae..26c25b6a 100644 --- a/TransactionProcessor.DomainEvents/TransactionProcessor.DomainEvents.csproj +++ b/TransactionProcessor.DomainEvents/TransactionProcessor.DomainEvents.csproj @@ -6,6 +6,6 @@ enable - + diff --git a/TransactionProcessor.IntegrationTesting.Helpers/TransactionProcessor.IntegrationTesting.Helpers.csproj b/TransactionProcessor.IntegrationTesting.Helpers/TransactionProcessor.IntegrationTesting.Helpers.csproj index c7b2e1a7..8c8c2f03 100644 --- a/TransactionProcessor.IntegrationTesting.Helpers/TransactionProcessor.IntegrationTesting.Helpers.csproj +++ b/TransactionProcessor.IntegrationTesting.Helpers/TransactionProcessor.IntegrationTesting.Helpers.csproj @@ -7,9 +7,10 @@ - - - + + + + diff --git a/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs b/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs index b6bc2025..11eb0107 100644 --- a/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Contract.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Contract")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class ContractFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Contract", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "Contract.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Contract", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,14 +90,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table1 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table1 = new global::Reqnroll.Table(new string[] { "Role Name"}); table1.AddRow(new string[] { "Estate"}); #line 5 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table1, "Given "); #line hidden - Reqnroll.Table table2 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table2 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -99,7 +108,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 9 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table2, "Given "); #line hidden - Reqnroll.Table table3 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table3 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -114,7 +123,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 13 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table3, "Given "); #line hidden - Reqnroll.Table table4 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table4 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -135,14 +144,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 17 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table4, "Given "); #line hidden - Reqnroll.Table table5 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "ClientId"}); table5.AddRow(new string[] { "serviceClient"}); #line 22 await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table5, "Given "); #line hidden - Reqnroll.Table table6 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table6 = new global::Reqnroll.Table(new string[] { "EstateName"}); table6.AddRow(new string[] { "Test Estate 1"}); @@ -151,7 +160,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 26 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table6, "Given "); #line hidden - Reqnroll.Table table7 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table7 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -169,7 +178,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 31 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table7, "Given "); #line hidden - Reqnroll.Table table8 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table8.AddRow(new string[] { @@ -181,7 +190,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 36 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table8, "And "); #line hidden - Reqnroll.Table table9 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -210,11 +219,11 @@ public async System.Threading.Tasks.Task GetMerchantContracts() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Merchant Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Merchant Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 46 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -224,7 +233,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table10 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table10 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -254,7 +263,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() #line 48 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table10, "Given "); #line hidden - Reqnroll.Table table11 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table11 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -269,7 +278,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() #line 53 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table11, "Given "); #line hidden - Reqnroll.Table table12 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -312,7 +321,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() #line 58 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table12, "When "); #line hidden - Reqnroll.Table table13 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -369,7 +378,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() #line 65 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table13, "When "); #line hidden - Reqnroll.Table table14 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -384,7 +393,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() #line 73 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table14, "When "); #line hidden - Reqnroll.Table table15 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { "ContractDescription", "ProductName"}); table15.AddRow(new string[] { @@ -397,7 +406,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() await testRunner.ThenAsync("I get the Contracts for \'Test Estate 1\' the following contract details are return" + "ed", ((string)(null)), table15, "Then "); #line hidden - Reqnroll.Table table16 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { "ContractDescription", "ProductName"}); table16.AddRow(new string[] { @@ -410,7 +419,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() await testRunner.ThenAsync("I get the Contracts for \'Test Estate 2\' the following contract details are return" + "ed", ((string)(null)), table16, "Then "); #line hidden - Reqnroll.Table table17 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { "ContractDescription", "ProductName"}); table17.AddRow(new string[] { @@ -423,7 +432,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() 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 - Reqnroll.Table table18 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { "ContractDescription", "ProductName"}); table18.AddRow(new string[] { @@ -436,7 +445,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() 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 - Reqnroll.Table table19 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { "CalculationType", "FeeDescription", "Value", @@ -455,7 +464,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() 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 - Reqnroll.Table table20 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { "CalculationType", "FeeDescription", "Value", @@ -469,7 +478,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() 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 - Reqnroll.Table table21 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { "CalculationType", "FeeDescription", "Value", @@ -483,7 +492,7 @@ public async System.Threading.Tasks.Task GetMerchantContracts() 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 - Reqnroll.Table table22 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { "CalculationType", "FeeDescription", "Value", @@ -507,11 +516,11 @@ public async System.Threading.Tasks.Task PreventDuplicateContracts() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Prevent Duplicate Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Prevent Duplicate Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 116 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -521,7 +530,7 @@ public async System.Threading.Tasks.Task PreventDuplicateContracts() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table23 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -532,7 +541,7 @@ public async System.Threading.Tasks.Task PreventDuplicateContracts() #line 118 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table23, "Given "); #line hidden - Reqnroll.Table table24 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); diff --git a/TransactionProcessor.IntegrationTests/Features/Estate.feature.cs b/TransactionProcessor.IntegrationTests/Features/Estate.feature.cs index fc40378d..b6d36efb 100644 --- a/TransactionProcessor.IntegrationTests/Features/Estate.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Estate.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Estate")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class EstateFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Estate", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "Estate.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Estate", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,14 +90,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table25 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "Role Name"}); table25.AddRow(new string[] { "Estate"}); #line 5 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table25, "Given "); #line hidden - Reqnroll.Table table26 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -99,7 +108,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 9 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table26, "Given "); #line hidden - Reqnroll.Table table27 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -114,7 +123,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 13 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table27, "Given "); #line hidden - Reqnroll.Table table28 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -135,7 +144,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 17 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table28, "Given "); #line hidden - Reqnroll.Table table29 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { "ClientId"}); table29.AddRow(new string[] { "serviceClient"}); @@ -150,11 +159,11 @@ public async System.Threading.Tasks.Task GetEstate() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Estate", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Estate", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 26 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -164,14 +173,14 @@ public async System.Threading.Tasks.Task GetEstate() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table30 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { "EstateName"}); table30.AddRow(new string[] { "Test Estate 1"}); #line 27 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table30, "Given "); #line hidden - Reqnroll.Table table31 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -189,7 +198,7 @@ public async System.Threading.Tasks.Task GetEstate() #line 30 await testRunner.AndAsync("I have created the following operators", ((string)(null)), table31, "And "); #line hidden - Reqnroll.Table table32 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table32.AddRow(new string[] { @@ -201,7 +210,7 @@ public async System.Threading.Tasks.Task GetEstate() #line 34 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table32, "And "); #line hidden - Reqnroll.Table table33 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -222,14 +231,14 @@ public async System.Threading.Tasks.Task GetEstate() #line 38 await testRunner.AndAsync("I have created the following security users", ((string)(null)), table33, "And "); #line hidden - Reqnroll.Table table34 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table34 = new global::Reqnroll.Table(new string[] { "EstateName"}); table34.AddRow(new string[] { "Test Estate 1"}); #line 42 await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate details are returned as follows", ((string)(null)), table34, "When "); #line hidden - Reqnroll.Table table35 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { "OperatorName"}); table35.AddRow(new string[] { "Test Operator 1"}); @@ -239,7 +248,7 @@ public async System.Threading.Tasks.Task GetEstate() await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate operator details are returned as foll" + "ows", ((string)(null)), table35, "When "); #line hidden - Reqnroll.Table table36 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { "EmailAddress"}); table36.AddRow(new string[] { "estateuser1@testestate1.co.uk"}); @@ -250,20 +259,20 @@ await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate securi " follows", ((string)(null)), table36, "When "); #line hidden #line 53 - await testRunner.WhenAsync("I get the estate \"Test Estate 2\" an error is returned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + await testRunner.WhenAsync("I get the estate \"Test Estate 2\" an error is returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden #line 54 await testRunner.GivenAsync("I am logged in as \"estateuser1@testestate1.co.uk\" with password \"123456\" for Esta" + - "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table37 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { "EstateName"}); table37.AddRow(new string[] { "Test Estate 1"}); #line 55 await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate details are returned as follows", ((string)(null)), table37, "When "); #line hidden - Reqnroll.Table table38 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { "OperatorName"}); table38.AddRow(new string[] { "Test Operator 1"}); @@ -273,7 +282,7 @@ await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate securi await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate operator details are returned as foll" + "ows", ((string)(null)), table38, "When "); #line hidden - Reqnroll.Table table39 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { "EmailAddress"}); table39.AddRow(new string[] { "estateuser1@testestate1.co.uk"}); @@ -284,7 +293,7 @@ await testRunner.WhenAsync("I get the estate \"Test Estate 1\" the estate securi " follows", ((string)(null)), table39, "When "); #line hidden #line 66 - await testRunner.WhenAsync("I get the estate \"Test Estate 2\" an error is returned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + await testRunner.WhenAsync("I get the estate \"Test Estate 2\" an error is returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); @@ -296,11 +305,11 @@ public async System.Threading.Tasks.Task UpdateEstate() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Update Estate", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Update Estate", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 68 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -310,14 +319,14 @@ public async System.Threading.Tasks.Task UpdateEstate() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table40 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { "EstateName"}); table40.AddRow(new string[] { "Test Estate 1"}); #line 69 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table40, "Given "); #line hidden - Reqnroll.Table table41 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -335,7 +344,7 @@ public async System.Threading.Tasks.Task UpdateEstate() #line 72 await testRunner.AndAsync("I have created the following operators", ((string)(null)), table41, "And "); #line hidden - Reqnroll.Table table42 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table42.AddRow(new string[] { @@ -347,7 +356,7 @@ public async System.Threading.Tasks.Task UpdateEstate() #line 76 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table42, "And "); #line hidden - Reqnroll.Table table43 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -370,7 +379,7 @@ public async System.Threading.Tasks.Task UpdateEstate() #line hidden #line 84 await testRunner.WhenAsync("I remove the operator \'Test Operator 1\' from estate \'Test Estate 1\' the operator " + - "is removed", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "is removed", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs b/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs index ca4b348a..2048e445 100644 --- a/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/LogonTransaction.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("LogonTransaction")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class LogonTransactionFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "LogonTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "LogonTransaction.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "LogonTransaction", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table44 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -96,7 +105,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table44, "Given "); #line hidden - Reqnroll.Table table45 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -117,7 +126,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 11 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table45, "Given "); #line hidden - Reqnroll.Table table46 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -132,7 +141,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 16 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table46, "Given "); #line hidden - Reqnroll.Table table47 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { "ClientId"}); table47.AddRow(new string[] { "serviceClient"}); @@ -140,14 +149,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + "s", ((string)(null)), table47, "Given "); #line hidden - Reqnroll.Table table48 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { "EstateName"}); table48.AddRow(new string[] { "Test Estate 1"}); #line 24 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table48, "Given "); #line hidden - Reqnroll.Table table49 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -160,7 +169,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 28 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table49, "Given "); #line hidden - Reqnroll.Table table50 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table50.AddRow(new string[] { @@ -169,7 +178,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 32 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table50, "And "); #line hidden - Reqnroll.Table table51 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -244,7 +253,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table51, "Given "); #line hidden - Reqnroll.Table table52 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -305,11 +314,11 @@ public async System.Threading.Tasks.Task LogonTransactions() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Logon Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Logon Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 57 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -319,7 +328,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table53 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -350,7 +359,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 59 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table53, "When "); #line hidden - Reqnroll.Table table54 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -377,7 +386,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 65 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table54, "Then "); #line hidden - Reqnroll.Table table55 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "MerchantNumber", @@ -390,7 +399,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 71 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table55, "Given "); #line hidden - Reqnroll.Table table56 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -407,7 +416,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 75 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table56, "When "); #line hidden - Reqnroll.Table table57 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -422,7 +431,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 79 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table57, "Then "); #line hidden - Reqnroll.Table table58 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -439,7 +448,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 83 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table58, "When "); #line hidden - Reqnroll.Table table59 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -454,7 +463,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 87 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table59, "Then "); #line hidden - Reqnroll.Table table60 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -471,7 +480,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 91 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table60, "When "); #line hidden - Reqnroll.Table table61 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -486,7 +495,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 95 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table61, "Then "); #line hidden - Reqnroll.Table table62 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -503,7 +512,7 @@ public async System.Threading.Tasks.Task LogonTransactions() #line 99 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table62, "When "); #line hidden - Reqnroll.Table table63 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", diff --git a/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs b/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs index d9f9c7da..89ac2554 100644 --- a/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Merchant.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Merchant")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class MerchantFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Merchant", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "Merchant.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Merchant", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table64 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { "Role Name"}); table64.AddRow(new string[] { "Estate"}); @@ -90,7 +99,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table64, "Given "); #line hidden - Reqnroll.Table table65 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -101,7 +110,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 11 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table65, "Given "); #line hidden - Reqnroll.Table table66 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -116,7 +125,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 15 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table66, "Given "); #line hidden - Reqnroll.Table table67 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -137,14 +146,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 19 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table67, "Given "); #line hidden - Reqnroll.Table table68 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { "ClientId"}); table68.AddRow(new string[] { "serviceClient"}); #line 24 await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table68, "Given "); #line hidden - Reqnroll.Table table69 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { "EstateName"}); table69.AddRow(new string[] { "Test Estate 1"}); @@ -153,7 +162,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 28 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table69, "Given "); #line hidden - Reqnroll.Table table70 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -171,7 +180,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 33 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table70, "Given "); #line hidden - Reqnroll.Table table71 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table71.AddRow(new string[] { @@ -183,7 +192,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 38 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table71, "And "); #line hidden - Reqnroll.Table table72 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -194,7 +203,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 43 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table72, "Given "); #line hidden - Reqnroll.Table table73 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -223,11 +232,11 @@ public async System.Threading.Tasks.Task GetInvalidMerchant_SystemLogin() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Invalid Merchant - System Login", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Invalid Merchant - System Login", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 52 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -239,7 +248,7 @@ public async System.Threading.Tasks.Task GetInvalidMerchant_SystemLogin() #line hidden #line 53 await testRunner.WhenAsync("I get the merchant \"Test Merchant 1\" for estate \"Test Estate 1\" an error is retur" + - "ned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "ned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); @@ -251,11 +260,11 @@ public async System.Threading.Tasks.Task GetInvalidMerchant_EstateUser() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Invalid Merchant - Estate User", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Invalid Merchant - Estate User", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 55 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -267,11 +276,11 @@ public async System.Threading.Tasks.Task GetInvalidMerchant_EstateUser() #line hidden #line 56 await testRunner.GivenAsync("I am logged in as \"estateuser1@testestate1.co.uk\" with password \"123456\" for Esta" + - "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden #line 57 await testRunner.WhenAsync("I get the merchant \"Test Merchant 1\" for estate \"Test Estate 1\" an error is retur" + - "ned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "ned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); @@ -283,11 +292,11 @@ public async System.Threading.Tasks.Task CreateMerchant_SystemLogin() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Create Merchant - System Login", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Create Merchant - System Login", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 59 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -297,7 +306,7 @@ public async System.Threading.Tasks.Task CreateMerchant_SystemLogin() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table74 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -320,7 +329,7 @@ public async System.Threading.Tasks.Task CreateMerchant_SystemLogin() #line 60 await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table74, "When "); #line hidden - Reqnroll.Table table75 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -335,7 +344,7 @@ public async System.Threading.Tasks.Task CreateMerchant_SystemLogin() #line 63 await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table75, "When "); #line hidden - Reqnroll.Table table76 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -352,7 +361,7 @@ public async System.Threading.Tasks.Task CreateMerchant_SystemLogin() #line 66 await testRunner.WhenAsync("I create the following security users", ((string)(null)), table76, "When "); #line hidden - Reqnroll.Table table77 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -363,7 +372,7 @@ public async System.Threading.Tasks.Task CreateMerchant_SystemLogin() #line 69 await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table77, "When "); #line hidden - Reqnroll.Table table78 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { "OriginalDeviceIdentifier", "NewDeviceIdentifier", "MerchantName", @@ -386,11 +395,11 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Create Merchant - Estate User", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Create Merchant - Estate User", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 76 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -402,9 +411,9 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line hidden #line 77 await testRunner.GivenAsync("I am logged in as \"estateuser1@testestate1.co.uk\" with password \"123456\" for Esta" + - "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table79 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -427,7 +436,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 78 await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table79, "When "); #line hidden - Reqnroll.Table table80 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -442,7 +451,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 81 await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table80, "When "); #line hidden - Reqnroll.Table table81 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -459,7 +468,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 84 await testRunner.WhenAsync("I create the following security users", ((string)(null)), table81, "When "); #line hidden - Reqnroll.Table table82 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -470,7 +479,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 87 await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table82, "When "); #line hidden - Reqnroll.Table table83 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { "OriginalDeviceIdentifier", "NewDeviceIdentifier", "MerchantName", @@ -483,7 +492,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 90 await testRunner.WhenAsync("I swap the merchant device the device is swapped", ((string)(null)), table83, "When "); #line hidden - Reqnroll.Table table84 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -516,7 +525,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 93 await testRunner.WhenAsync("I make the following manual merchant deposits", ((string)(null)), table84, "When "); #line hidden - Reqnroll.Table table85 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", @@ -529,7 +538,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 100 await testRunner.WhenAsync("I make the following merchant withdrawals", ((string)(null)), table85, "When "); #line hidden - Reqnroll.Table table86 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table86 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", @@ -557,7 +566,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 104 await testRunner.WhenAsync("I make the following automatic merchant deposits", ((string)(null)), table86, "When "); #line hidden - Reqnroll.Table table87 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", @@ -570,7 +579,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 111 await testRunner.WhenAsync("I make the following manual merchant deposits the deposit is rejected", ((string)(null)), table87, "When "); #line hidden - Reqnroll.Table table88 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", @@ -583,7 +592,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 115 await testRunner.WhenAsync("I make the following manual merchant deposits the deposit is rejected", ((string)(null)), table88, "When "); #line hidden - Reqnroll.Table table89 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", @@ -596,7 +605,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 119 await testRunner.WhenAsync("I make the following automatic merchant deposits the deposit is rejected", ((string)(null)), table89, "When "); #line hidden - Reqnroll.Table table90 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table90 = new global::Reqnroll.Table(new string[] { "Amount", "DateTime", "MerchantName", @@ -609,7 +618,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 123 await testRunner.WhenAsync("I make the following automatic merchant deposits the deposit is rejected", ((string)(null)), table90, "When "); #line hidden - Reqnroll.Table table91 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table91 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -648,7 +657,7 @@ public async System.Threading.Tasks.Task CreateMerchant_EstateUser() #line 127 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table91, "Given "); #line hidden - Reqnroll.Table table92 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table92 = new global::Reqnroll.Table(new string[] { "MerchantName", "EstateName", "SettlementSchedule"}); @@ -679,11 +688,11 @@ public async System.Threading.Tasks.Task GetMerchantsForEstate() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Merchants for Estate", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Merchants for Estate", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 140 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -693,7 +702,7 @@ public async System.Threading.Tasks.Task GetMerchantsForEstate() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table93 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table93 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -750,7 +759,7 @@ public async System.Threading.Tasks.Task GetMerchantsForEstate() #line 141 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table93, "Given "); #line hidden - Reqnroll.Table table94 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table94 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -789,7 +798,7 @@ public async System.Threading.Tasks.Task GetMerchantsForEstate() #line 149 await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table94, "When "); #line hidden - Reqnroll.Table table95 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table95 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -816,7 +825,7 @@ public async System.Threading.Tasks.Task GetMerchantsForEstate() #line 157 await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table95, "When "); #line hidden - Reqnroll.Table table96 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table96 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -862,24 +871,24 @@ public async System.Threading.Tasks.Task GetMerchantsForEstate() await testRunner.WhenAsync("I create the following security users", ((string)(null)), table96, "When "); #line hidden #line 173 - await testRunner.WhenAsync("I get the merchants for \'Test Estate 1\' then 3 merchants will be returned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + await testRunner.WhenAsync("I get the merchants for \'Test Estate 1\' then 3 merchants will be returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden #line 175 - await testRunner.WhenAsync("I get the merchants for \'Test Estate 2\' then 2 merchants will be returned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + await testRunner.WhenAsync("I get the merchants for \'Test Estate 2\' then 2 merchants will be returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden #line 177 await testRunner.GivenAsync("I am logged in as \"estateuser1@testestate1.co.uk\" with password \"123456\" for Esta" + - "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "te \"Test Estate 1\" with client \"estateClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden #line 179 - await testRunner.WhenAsync("I get the merchants for \'Test Estate 1\' then 3 merchants will be returned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + await testRunner.WhenAsync("I get the merchants for \'Test Estate 1\' then 3 merchants will be returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden #line 181 await testRunner.GivenAsync("I am logged in as \"estateuser1@testestate2.co.uk\" with password \"123456\" for Esta" + - "te \"Test Estate 2\" with client \"estateClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "te \"Test Estate 2\" with client \"estateClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden #line 183 - await testRunner.WhenAsync("I get the merchants for \'Test Estate 2\' then 2 merchants will be returned", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + await testRunner.WhenAsync("I get the merchants for \'Test Estate 2\' then 2 merchants will be returned", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); @@ -893,11 +902,11 @@ public async System.Threading.Tasks.Task UpdateMerchant() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Update Merchant", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Update Merchant", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 186 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -907,7 +916,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table97 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table97 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -930,7 +939,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 187 await testRunner.WhenAsync("I create the following merchants", ((string)(null)), table97, "When "); #line hidden - Reqnroll.Table table98 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table98 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -945,7 +954,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 190 await testRunner.WhenAsync("I assign the following operator to the merchants", ((string)(null)), table98, "When "); #line hidden - Reqnroll.Table table99 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table99 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -962,7 +971,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 193 await testRunner.WhenAsync("I create the following security users", ((string)(null)), table99, "When "); #line hidden - Reqnroll.Table table100 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table100 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -973,7 +982,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 196 await testRunner.WhenAsync("I add the following devices to the merchant", ((string)(null)), table100, "When "); #line hidden - Reqnroll.Table table101 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table101 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -984,7 +993,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 199 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table101, "When "); #line hidden - Reqnroll.Table table102 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table102 = new global::Reqnroll.Table(new string[] { "UpdateMerchantName", "SettlementSchedule", "EstateName", @@ -997,7 +1006,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 202 await testRunner.WhenAsync("I update the merchants with the following details", ((string)(null)), table102, "When "); #line hidden - Reqnroll.Table table103 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table103 = new global::Reqnroll.Table(new string[] { "AddressLine1", "AddressLine2", "AddressLine3", @@ -1020,7 +1029,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 205 await testRunner.WhenAsync("I update the merchants address with the following details", ((string)(null)), table103, "When "); #line hidden - Reqnroll.Table table104 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table104 = new global::Reqnroll.Table(new string[] { "ContactName", "EmailAddress", "PhoneNumber", @@ -1035,7 +1044,7 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line 208 await testRunner.WhenAsync("I update the merchants contact with the following details", ((string)(null)), table104, "When "); #line hidden - Reqnroll.Table table105 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table105 = new global::Reqnroll.Table(new string[] { "OriginalDeviceIdentifier", "NewDeviceIdentifier", "MerchantName", @@ -1050,11 +1059,11 @@ public async System.Threading.Tasks.Task UpdateMerchant() #line hidden #line 214 await testRunner.WhenAsync("I remove the contract \'Safaricom Contract\' from merchant \'Test Merchant 1\' on \'Te" + - "st Estate 1\' the contract is removed", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "st Estate 1\' the contract is removed", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden #line 215 await testRunner.WhenAsync("I remove the operator \'Test Operator 1\' from merchant \'Test Merchant 1\' on \'Test " + - "Estate 1\' the operator is removed", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "Estate 1\' the operator is removed", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs b/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs index 96ac3152..57e04074 100644 --- a/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Operator.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Operator")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class OperatorFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Operator", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "Operator.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Operator", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,14 +90,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table106 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table106 = new global::Reqnroll.Table(new string[] { "Role Name"}); table106.AddRow(new string[] { "Estate"}); #line 5 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table106, "Given "); #line hidden - Reqnroll.Table table107 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table107 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -99,7 +108,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 9 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table107, "Given "); #line hidden - Reqnroll.Table table108 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table108 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -114,7 +123,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 13 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table108, "Given "); #line hidden - Reqnroll.Table table109 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table109 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -135,14 +144,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 17 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table109, "Given "); #line hidden - Reqnroll.Table table110 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table110 = new global::Reqnroll.Table(new string[] { "ClientId"}); table110.AddRow(new string[] { "serviceClient"}); #line 22 await testRunner.GivenAsync("I have a token to access the estate management resource", ((string)(null)), table110, "Given "); #line hidden - Reqnroll.Table table111 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table111 = new global::Reqnroll.Table(new string[] { "EstateName"}); table111.AddRow(new string[] { "Test Estate 1"}); @@ -159,11 +168,11 @@ public async System.Threading.Tasks.Task UpdateOperator() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Update Operator", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Update Operator", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 31 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -173,7 +182,7 @@ public async System.Threading.Tasks.Task UpdateOperator() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table112 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table112 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -186,7 +195,7 @@ public async System.Threading.Tasks.Task UpdateOperator() #line 33 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table112, "Given "); #line hidden - Reqnroll.Table table113 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table113 = new global::Reqnroll.Table(new string[] { "UpdateOperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber", @@ -201,7 +210,7 @@ public async System.Threading.Tasks.Task UpdateOperator() #line 37 await testRunner.WhenAsync("I update the operators with the following details", ((string)(null)), table113, "When "); #line hidden - Reqnroll.Table table114 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table114 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", diff --git a/TransactionProcessor.IntegrationTests/Features/ReconciliationFeature.feature.cs b/TransactionProcessor.IntegrationTests/Features/ReconciliationFeature.feature.cs index 28366251..e32f7c39 100644 --- a/TransactionProcessor.IntegrationTests/Features/ReconciliationFeature.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/ReconciliationFeature.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Reconciliation")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class ReconciliationFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Reconciliation", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "ReconciliationFeature.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Reconciliation", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table115 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table115 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -96,7 +105,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table115, "Given "); #line hidden - Reqnroll.Table table116 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table116 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -117,7 +126,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 11 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table116, "Given "); #line hidden - Reqnroll.Table table117 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table117 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -132,7 +141,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 16 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table117, "Given "); #line hidden - Reqnroll.Table table118 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table118 = new global::Reqnroll.Table(new string[] { "ClientId"}); table118.AddRow(new string[] { "serviceClient"}); @@ -140,7 +149,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + "s", ((string)(null)), table118, "Given "); #line hidden - Reqnroll.Table table119 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table119 = new global::Reqnroll.Table(new string[] { "EstateName"}); table119.AddRow(new string[] { "Test Estate 1"}); @@ -149,7 +158,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 24 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table119, "Given "); #line hidden - Reqnroll.Table table120 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table120 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -167,7 +176,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 29 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table120, "Given "); #line hidden - Reqnroll.Table table121 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table121 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table121.AddRow(new string[] { @@ -179,7 +188,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 34 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table121, "And "); #line hidden - Reqnroll.Table table122 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table122 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -194,7 +203,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 39 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table122, "Given "); #line hidden - Reqnroll.Table table123 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table123 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -221,7 +230,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 44 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table123, "When "); #line hidden - Reqnroll.Table table124 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table124 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -248,7 +257,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 49 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table124, "When "); #line hidden - Reqnroll.Table table125 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table125 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -287,7 +296,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 54 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table125, "Given "); #line hidden - Reqnroll.Table table126 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table126 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -314,7 +323,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 60 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table126, "Given "); #line hidden - Reqnroll.Table table127 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table127 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -333,7 +342,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 66 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table127, "Given "); #line hidden - Reqnroll.Table table128 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table128 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -370,11 +379,11 @@ public async System.Threading.Tasks.Task ReconciliationTransactions() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Reconciliation Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Reconciliation Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 79 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -384,7 +393,7 @@ public async System.Threading.Tasks.Task ReconciliationTransactions() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table129 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table129 = new global::Reqnroll.Table(new string[] { "DateTime", "MerchantName", "DeviceIdentifier", @@ -419,7 +428,7 @@ public async System.Threading.Tasks.Task ReconciliationTransactions() #line 81 await testRunner.WhenAsync("I perform the following reconciliations", ((string)(null)), table129, "When "); #line hidden - Reqnroll.Table table130 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table130 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ResponseCode", diff --git a/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs b/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs index ccbb835b..564268bf 100644 --- a/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/RedeemVoucher.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("RedeemVoucher")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class RedeemVoucherFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "RedeemVoucher", "\tSimple calculator for adding two numbers", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "RedeemVoucher.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "RedeemVoucher", "\tSimple calculator for adding two numbers", ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 5 #line hidden - Reqnroll.Table table131 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table131 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -96,7 +105,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 7 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table131, "Given "); #line hidden - Reqnroll.Table table132 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table132 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -117,7 +126,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 12 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table132, "Given "); #line hidden - Reqnroll.Table table133 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table133 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -132,7 +141,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 17 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table133, "Given "); #line hidden - Reqnroll.Table table134 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table134 = new global::Reqnroll.Table(new string[] { "ClientId"}); table134.AddRow(new string[] { "serviceClient"}); @@ -140,7 +149,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + "s", ((string)(null)), table134, "Given "); #line hidden - Reqnroll.Table table135 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table135 = new global::Reqnroll.Table(new string[] { "EstateName"}); table135.AddRow(new string[] { "Test Estate 1"}); @@ -149,7 +158,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 25 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table135, "Given "); #line hidden - Reqnroll.Table table136 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table136 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -162,7 +171,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 30 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table136, "Given "); #line hidden - Reqnroll.Table table137 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table137 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table137.AddRow(new string[] { @@ -171,7 +180,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 34 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table137, "And "); #line hidden - Reqnroll.Table table138 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table138 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -182,7 +191,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 38 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table138, "Given "); #line hidden - Reqnroll.Table table139 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table139 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -201,7 +210,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 42 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table139, "When "); #line hidden - Reqnroll.Table table140 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table140 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -222,7 +231,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 46 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table140, "Given "); #line hidden - Reqnroll.Table table141 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table141 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -237,7 +246,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 50 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table141, "Given "); #line hidden - Reqnroll.Table table142 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table142 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -248,7 +257,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 54 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table142, "Given "); #line hidden - Reqnroll.Table table143 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table143 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -263,7 +272,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 58 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table143, "Given "); #line hidden - Reqnroll.Table table144 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table144 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -274,7 +283,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 62 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table144, "When "); #line hidden - Reqnroll.Table table145 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table145 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -325,11 +334,11 @@ public async System.Threading.Tasks.Task RedeemVouchers() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Redeem Vouchers", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Redeem Vouchers", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 72 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -341,7 +350,7 @@ public async System.Threading.Tasks.Task RedeemVouchers() #line hidden #line 73 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)), ((Reqnroll.Table)(null)), "When "); + "ansaction number 1 the voucher balance will be 0", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs b/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs index fcd7dcdb..cfbfc96b 100644 --- a/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/SaleTransactionFeature.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("SaleTransaction")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class SaleTransactionFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SaleTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "SaleTransactionFeature.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SaleTransaction", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table146 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table146 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -104,7 +113,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table146, "Given "); #line hidden - Reqnroll.Table table147 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table147 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -137,7 +146,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 13 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table147, "Given "); #line hidden - Reqnroll.Table table148 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table148 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -152,7 +161,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 20 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table148, "Given "); #line hidden - Reqnroll.Table table149 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table149 = new global::Reqnroll.Table(new string[] { "ClientId"}); table149.AddRow(new string[] { "serviceClient"}); @@ -160,7 +169,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + "s", ((string)(null)), table149, "Given "); #line hidden - Reqnroll.Table table150 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table150 = new global::Reqnroll.Table(new string[] { "AccountNumber", "AccountName", "DueDate", @@ -173,7 +182,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 28 await testRunner.GivenAsync("the following bills are available at the PataPawa PostPaid Host", ((string)(null)), table150, "Given "); #line hidden - Reqnroll.Table table151 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table151 = new global::Reqnroll.Table(new string[] { "Username", "Password"}); table151.AddRow(new string[] { @@ -182,7 +191,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 32 await testRunner.GivenAsync("the following users are available at the PataPawa PrePay Host", ((string)(null)), table151, "Given "); #line hidden - Reqnroll.Table table152 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table152 = new global::Reqnroll.Table(new string[] { "MeterNumber", "CustomerName"}); table152.AddRow(new string[] { @@ -197,14 +206,14 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 await testRunner.GivenAsync("the following meters are available at the PataPawa PrePay Host", ((string)(null)), table152, "Given "); #line hidden - Reqnroll.Table table153 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table153 = new global::Reqnroll.Table(new string[] { "EstateName"}); table153.AddRow(new string[] { "Test Estate 1"}); #line 42 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table153, "Given "); #line hidden - Reqnroll.Table table154 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table154 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -232,7 +241,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 46 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table154, "Given "); #line hidden - Reqnroll.Table table155 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table155 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table155.AddRow(new string[] { @@ -250,7 +259,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 53 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table155, "And "); #line hidden - Reqnroll.Table table156 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table156 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -273,7 +282,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 60 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table156, "Given "); #line hidden - Reqnroll.Table table157 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table157 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -316,7 +325,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 67 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table157, "When "); #line hidden - Reqnroll.Table table158 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table158 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -351,7 +360,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 74 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table158, "When "); #line hidden - Reqnroll.Table table159 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table159 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -399,7 +408,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 80 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table159, "Given "); #line hidden - Reqnroll.Table table160 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table160 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -504,7 +513,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 87 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table160, "Given "); #line hidden - Reqnroll.Table table161 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table161 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -527,7 +536,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 106 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table161, "Given "); #line hidden - Reqnroll.Table table162 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table162 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -560,7 +569,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 113 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table162, "Given "); #line hidden - Reqnroll.Table table163 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table163 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -641,11 +650,11 @@ public async System.Threading.Tasks.Task SaleTransactions() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Sale Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Sale Transactions", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 140 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -655,7 +664,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table164 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table164 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -898,7 +907,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 142 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table164, "When "); #line hidden - Reqnroll.Table table165 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table165 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -973,7 +982,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 156 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table165, "Then "); #line hidden - Reqnroll.Table table166 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table166 = new global::Reqnroll.Table(new string[] { "DateTime", "Reference", "EntryType", @@ -1073,7 +1082,7 @@ public async System.Threading.Tasks.Task SaleTransactions() 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)), table166, "Then "); #line hidden - Reqnroll.Table table167 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table167 = new global::Reqnroll.Table(new string[] { "DateTime", "Reference", "EntryType", @@ -1125,7 +1134,7 @@ public async System.Threading.Tasks.Task SaleTransactions() 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)), table167, "Then "); #line hidden - Reqnroll.Table table168 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table168 = new global::Reqnroll.Table(new string[] { "DateTime", "Reference", "EntryType", @@ -1177,7 +1186,7 @@ public async System.Threading.Tasks.Task SaleTransactions() 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)), table168, "Then "); #line hidden - Reqnroll.Table table169 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table169 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber"}); @@ -1188,7 +1197,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 200 await testRunner.WhenAsync("I request the receipt is resent", ((string)(null)), table169, "When "); #line hidden - Reqnroll.Table table170 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table170 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1219,7 +1228,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 204 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table170, "When "); #line hidden - Reqnroll.Table table171 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table171 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1234,7 +1243,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 208 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table171, "Then "); #line hidden - Reqnroll.Table table172 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table172 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1265,7 +1274,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 212 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table172, "When "); #line hidden - Reqnroll.Table table173 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table173 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1280,7 +1289,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 216 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table173, "Then "); #line hidden - Reqnroll.Table table174 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table174 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1311,7 +1320,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 220 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table174, "When "); #line hidden - Reqnroll.Table table175 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table175 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1327,7 +1336,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 224 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table175, "Then "); #line hidden - Reqnroll.Table table176 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table176 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1358,7 +1367,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 228 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table176, "When "); #line hidden - Reqnroll.Table table177 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table177 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1374,7 +1383,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 232 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table177, "Then "); #line hidden - Reqnroll.Table table178 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table178 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1405,7 +1414,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 236 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table178, "When "); #line hidden - Reqnroll.Table table179 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table179 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1421,7 +1430,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 240 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table179, "Then "); #line hidden - Reqnroll.Table table180 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table180 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1452,7 +1461,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 244 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table180, "When "); #line hidden - Reqnroll.Table table181 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table181 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1468,7 +1477,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 248 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table181, "Then "); #line hidden - Reqnroll.Table table182 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table182 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1499,7 +1508,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 252 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table182, "When "); #line hidden - Reqnroll.Table table183 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table183 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -1515,7 +1524,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 256 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table183, "Then "); #line hidden - Reqnroll.Table table184 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table184 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -1546,7 +1555,7 @@ public async System.Threading.Tasks.Task SaleTransactions() #line 260 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table184, "When "); #line hidden - Reqnroll.Table table185 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table185 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", diff --git a/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs b/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs index f998cb4f..9c0e4233 100644 --- a/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/Settlement.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Settlement")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class SettlementFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Settlement", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "Settlement.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Settlement", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table186 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table186 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -100,7 +109,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table186, "Given "); #line hidden - Reqnroll.Table table187 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table187 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -127,7 +136,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 12 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table187, "Given "); #line hidden - Reqnroll.Table table188 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table188 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -142,7 +151,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 18 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table188, "Given "); #line hidden - Reqnroll.Table table189 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table189 = new global::Reqnroll.Table(new string[] { "ClientId"}); table189.AddRow(new string[] { "serviceClient"}); @@ -150,14 +159,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + "s", ((string)(null)), table189, "Given "); #line hidden - Reqnroll.Table table190 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table190 = new global::Reqnroll.Table(new string[] { "EstateName"}); table190.AddRow(new string[] { "Test Estate 1"}); #line 26 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table190, "Given "); #line hidden - Reqnroll.Table table191 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table191 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -175,7 +184,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 30 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table191, "Given "); #line hidden - Reqnroll.Table table192 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table192 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table192.AddRow(new string[] { @@ -187,7 +196,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 35 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table192, "And "); #line hidden - Reqnroll.Table table193 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table193 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -202,7 +211,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 40 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table193, "Given "); #line hidden - Reqnroll.Table table194 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table194 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -229,7 +238,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 45 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table194, "When "); #line hidden - Reqnroll.Table table195 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table195 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -256,11 +265,11 @@ public async System.Threading.Tasks.Task GetPendingSettlement() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Pending Settlement", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Pending Settlement", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 54 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -270,7 +279,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table196 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table196 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -313,7 +322,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 55 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table196, "Given "); #line hidden - Reqnroll.Table table197 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table197 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -358,7 +367,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 61 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table197, "Given "); #line hidden - Reqnroll.Table table198 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table198 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -377,7 +386,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 70 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table198, "Given "); #line hidden - Reqnroll.Table table199 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table199 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -404,7 +413,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 76 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table199, "Given "); #line hidden - Reqnroll.Table table200 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table200 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -435,7 +444,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 82 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table200, "When "); #line hidden - Reqnroll.Table table201 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table201 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -582,7 +591,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 91 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table201, "When "); #line hidden - Reqnroll.Table table202 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table202 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -639,7 +648,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 102 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table202, "Then "); #line hidden - Reqnroll.Table table203 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table203 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", @@ -657,7 +666,7 @@ public async System.Threading.Tasks.Task GetPendingSettlement() #line 113 await testRunner.WhenAsync("I get the pending settlements the following information should be returned", ((string)(null)), table203, "When "); #line hidden - Reqnroll.Table table204 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table204 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", @@ -682,11 +691,11 @@ public async System.Threading.Tasks.Task ProcessSettlement() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Settlement", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Settlement", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 123 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -696,7 +705,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table205 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table205 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -729,7 +738,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 124 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table205, "Given "); #line hidden - Reqnroll.Table table206 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table206 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -762,7 +771,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 129 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table206, "Given "); #line hidden - Reqnroll.Table table207 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table207 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -777,7 +786,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 136 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table207, "Given "); #line hidden - Reqnroll.Table table208 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table208 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -800,7 +809,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 141 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table208, "When "); #line hidden - Reqnroll.Table table209 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table209 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -821,7 +830,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 148 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table209, "Given "); #line hidden - Reqnroll.Table table210 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table210 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -920,7 +929,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 153 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table210, "When "); #line hidden - Reqnroll.Table table211 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table211 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -959,7 +968,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 161 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table211, "Then "); #line hidden - Reqnroll.Table table212 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table212 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", @@ -975,7 +984,7 @@ public async System.Threading.Tasks.Task ProcessSettlement() #line 173 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)), ((Reqnroll.Table)(null)), "When "); + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs b/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs index 3e4c83a2..5c658af4 100644 --- a/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs +++ b/TransactionProcessor.IntegrationTests/Features/SettlementReporting.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by Reqnroll (https://www.reqnroll.net/). -// Reqnroll Version:1.0.0.0 -// Reqnroll Generator Version:1.0.0.0 +// Reqnroll Version:2.0.0.0 +// Reqnroll Generator Version:2.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,51 +17,60 @@ namespace TransactionProcessor.IntegrationTests.Features using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("SettlementReporting")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class SettlementReportingFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SettlementReporting", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "SettlementReporting.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual async System.Threading.Tasks.Task FeatureSetupAsync() + public static async System.Threading.Tasks.Task FeatureSetupAsync() { - testRunner = Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(null, NUnit.Framework.TestContext.CurrentContext.WorkerId); - Reqnroll.FeatureInfo featureInfo = new Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SettlementReporting", null, ProgrammingLanguage.CSharp, featureTags); - await testRunner.OnFeatureStartAsync(featureInfo); } [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async System.Threading.Tasks.Task FeatureTearDownAsync() { - await testRunner.OnFeatureEndAsync(); - testRunner = null; } [NUnit.Framework.SetUpAttribute()] public async System.Threading.Tasks.Task TestInitializeAsync() { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } [NUnit.Framework.TearDownAttribute()] public async System.Threading.Tasks.Task TestTearDownAsync() { await testRunner.OnScenarioEndAsync(); + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); } - public void ScenarioInitialize(Reqnroll.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); @@ -81,7 +90,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table213 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table213 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -96,7 +105,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table213, "Given "); #line hidden - Reqnroll.Table table214 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table214 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -117,7 +126,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 11 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table214, "Given "); #line hidden - Reqnroll.Table table215 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table215 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -132,7 +141,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 16 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table215, "Given "); #line hidden - Reqnroll.Table table216 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table216 = new global::Reqnroll.Table(new string[] { "ClientId"}); table216.AddRow(new string[] { "serviceClient"}); @@ -140,7 +149,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + "s", ((string)(null)), table216, "Given "); #line hidden - Reqnroll.Table table217 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table217 = new global::Reqnroll.Table(new string[] { "EstateName"}); table217.AddRow(new string[] { "Test Estate 1"}); @@ -149,7 +158,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 24 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table217, "Given "); #line hidden - Reqnroll.Table table218 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table218 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -167,7 +176,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 29 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table218, "Given "); #line hidden - Reqnroll.Table table219 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table219 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table219.AddRow(new string[] { @@ -179,7 +188,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 34 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table219, "And "); #line hidden - Reqnroll.Table table220 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table220 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -194,7 +203,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 39 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table220, "Given "); #line hidden - Reqnroll.Table table221 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table221 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -221,7 +230,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 44 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table221, "When "); #line hidden - Reqnroll.Table table222 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table222 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -251,7 +260,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 49 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table222, "When "); #line hidden - Reqnroll.Table table223 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table223 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -294,7 +303,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 54 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table223, "Given "); #line hidden - Reqnroll.Table table224 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table224 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -321,7 +330,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 60 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table224, "Given "); #line hidden - Reqnroll.Table table225 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table225 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -340,7 +349,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 66 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table225, "Given "); #line hidden - Reqnroll.Table table226 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table226 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -359,7 +368,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 72 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table226, "When "); #line hidden - Reqnroll.Table table227 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table227 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -386,7 +395,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 78 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table227, "Given "); #line hidden - Reqnroll.Table table228 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table228 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -585,7 +594,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 84 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table228, "When "); #line hidden - Reqnroll.Table table229 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table229 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", @@ -672,7 +681,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 102 await testRunner.ThenAsync("transaction response should contain the following information", ((string)(null)), table229, "Then "); #line hidden - Reqnroll.Table table230 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table230 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", @@ -693,14 +702,14 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 125 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)), ((Reqnroll.Table)(null)), "When "); + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden #line 127 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)), ((Reqnroll.Table)(null)), "When "); + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden - Reqnroll.Table table231 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table231 = new global::Reqnroll.Table(new string[] { "SettlementDate", "EstateName", "MerchantName", @@ -716,7 +725,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 133 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)), ((Reqnroll.Table)(null)), "When "); + "ted", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } @@ -730,11 +739,11 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() "settlement", "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get Settlements - Merchant Filter", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Settlements - Merchant Filter", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 137 this.ScenarioInitialize(scenarioInfo); #line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -744,7 +753,7 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table232 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table232 = new global::Reqnroll.Table(new string[] { "SettlementDate", "NumberOfFeesSettled", "ValueOfFeesSettled", @@ -759,7 +768,7 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() "Merchant 1\' with the Start Date \'2022-01-13\' and the End Date \'2022-02-06\' the f" + "ollowing data is returned", ((string)(null)), table232, "When "); #line hidden - Reqnroll.Table table233 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table233 = new global::Reqnroll.Table(new string[] { "SettlementDate", "NumberOfFeesSettled", "ValueOfFeesSettled", @@ -774,7 +783,7 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() "Merchant 2\' with the Start Date \'2022-01-13\' and the End Date \'2022-02-06\' the f" + "ollowing data is returned", ((string)(null)), table233, "When "); #line hidden - Reqnroll.Table table234 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table234 = new global::Reqnroll.Table(new string[] { "SettlementDate", "NumberOfFeesSettled", "ValueOfFeesSettled", @@ -789,7 +798,7 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() "Merchant 3\' with the Start Date \'2022-01-13\' and the End Date \'2022-02-06\' the f" + "ollowing data is returned", ((string)(null)), table234, "When "); #line hidden - Reqnroll.Table table235 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table235 = new global::Reqnroll.Table(new string[] { "FeeDescription", "IsSettled", "Operator", @@ -828,7 +837,7 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() 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)), table235, "When "); #line hidden - Reqnroll.Table table236 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table236 = new global::Reqnroll.Table(new string[] { "FeeDescription", "IsSettled", "Operator", @@ -852,7 +861,7 @@ public async System.Threading.Tasks.Task GetSettlements_MerchantFilter() 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)), table236, "When "); #line hidden - Reqnroll.Table table237 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table237 = new global::Reqnroll.Table(new string[] { "FeeDescription", "IsSettled", "Operator", diff --git a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj index a0727f9b..0bed3dd3 100644 --- a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj +++ b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj @@ -7,22 +7,24 @@ - + - - - + + + + + - - - - - - - - + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj b/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj index f6aa8670..91f625bb 100644 --- a/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj +++ b/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj @@ -9,17 +9,19 @@ - - - - - - - + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessor.ProjectionEngine/TransactionProcessor.ProjectionEngine.csproj b/TransactionProcessor.ProjectionEngine/TransactionProcessor.ProjectionEngine.csproj index d8272e51..8b0adee4 100644 --- a/TransactionProcessor.ProjectionEngine/TransactionProcessor.ProjectionEngine.csproj +++ b/TransactionProcessor.ProjectionEngine/TransactionProcessor.ProjectionEngine.csproj @@ -7,11 +7,13 @@ - - + + + + - - + + diff --git a/TransactionProcessor.Repository/TransactionProcessor.Repository.csproj b/TransactionProcessor.Repository/TransactionProcessor.Repository.csproj index d15a5181..41928062 100644 --- a/TransactionProcessor.Repository/TransactionProcessor.Repository.csproj +++ b/TransactionProcessor.Repository/TransactionProcessor.Repository.csproj @@ -8,13 +8,15 @@ - - - - - - - + + + + + + + + + diff --git a/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj b/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj index 345d0f59..4c214071 100644 --- a/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj +++ b/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj @@ -6,7 +6,9 @@ - + + + diff --git a/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj b/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj index d3d7aa56..39e45248 100644 --- a/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj +++ b/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj @@ -7,19 +7,23 @@ - - - - - + + + + + + + + + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessor/TransactionProcessor.csproj b/TransactionProcessor/TransactionProcessor.csproj index 14325607..fd72c76a 100644 --- a/TransactionProcessor/TransactionProcessor.csproj +++ b/TransactionProcessor/TransactionProcessor.csproj @@ -15,30 +15,31 @@ - - - - - - - - - - - - + + + + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + - + + - - + + diff --git a/TransactionProcessor/appsettings.json b/TransactionProcessor/appsettings.json index 93fae6d5..690c3c1e 100644 --- a/TransactionProcessor/appsettings.json +++ b/TransactionProcessor/appsettings.json @@ -7,304 +7,116 @@ //"SecurityService": "https://127.0.0.1:5001", "ProjectionTraceThresholdInSeconds": 1, "EventHandlerConfiguration": { - // Read Model Events - // Estate Domain Event Handler - "EstateCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "SecurityUserAddedToEstateEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "EstateReferenceAllocatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - // Merchant Domain Event Handler - "MerchantCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "MerchantReferenceAllocatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "AddressAddedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "ContactAddedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "SecurityUserAddedToMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "DeviceAddedToMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "DeviceSwappedForMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "OperatorAssignedToMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "OperatorRemovedFromMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "SettlementScheduleChangedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "ContractAddedToMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "ContractRemovedFromMerchantEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantNameUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantAddressLine1UpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantAddressLine2UpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantAddressLine3UpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantAddressLine4UpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantCountyUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantRegionUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantTownUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantPostalCodeUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantContactNameUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantContactEmailAddressUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "MerchantContactPhoneNumberUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - - // Contract Domain Event Handler - "ContractCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FixedValueProductAddedToContractEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "VariableValueProductAddedToContractEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "TransactionFeeForProductAddedToContractEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "TransactionFeeForProductDisabledEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - - // Transaction Event Handler - "TransactionHasBeenCompletedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "CustomerEmailReceiptRequestedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "SettledMerchantFeeAddedToTransactionEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "MerchantFeeSettledEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "TransactionCostInformationRecordedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "FloatCreditPurchasedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FloatCreatedForContractProductEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FloatDecreasedByTransactionEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "TransactionHasStartedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "AdditionalRequestDataRecordedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "AdditionalResponseDataRecordedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "TransactionHasBeenLocallyAuthorisedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "TransactionHasBeenLocallyDeclinedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "TransactionAuthorisedByOperatorEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "TransactionDeclinedByOperatorEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "ProductDetailsAddedToTransactionEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "TransactionSourceAddedToTransactionEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "ReconciliationHasStartedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "OverallTotalsRecordedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "ReconciliationHasBeenLocallyAuthorisedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "ReconciliationHasBeenLocallyDeclinedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "ReconciliationHasCompletedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - // Operator Domain Event Handler - "OperatorCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "OperatorNameUpdatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "OperatorRequireCustomMerchantNumberChangedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "OperatorRequireCustomTerminalNumberChangedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - - // Merchant Statement Domain Event Handler - "StatementCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "TransactionAddedToStatementEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "SettledFeeAddedToStatementEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "StatementGeneratedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic"//, - ], - // Settlement Domain Event Handler - "SettlementCreatedForDateEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "MerchantFeeAddedPendingSettlementEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "SettlementCompletedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "SettlementProcessingStartedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - - // File Processor Domain Event Handler - "ImportLogCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileAddedToImportLogEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileCreatedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileLineAddedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileLineProcessingSuccessfulEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileLineProcessingFailedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileLineProcessingIgnoredEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FileProcessingCompletedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic" + "TransactionProcessor.BusinessLogic.EventHandling.ReadModelDomainEventHandler, TransactionProcessor.BusinessLogic": [ + "EstateCreatedEvent", + "SecurityUserAddedToEstateEvent", + "EstateReferenceAllocatedEvent", + "MerchantCreatedEvent", + "MerchantReferenceAllocatedEvent", + "AddressAddedEvent", + "ContactAddedEvent", + "SecurityUserAddedToMerchantEvent", + "DeviceAddedToMerchantEvent", + "DeviceSwappedForMerchantEvent", + "OperatorAssignedToMerchantEvent", + "OperatorRemovedFromMerchantEvent", + "SettlementScheduleChangedEvent", + "ContractAddedToMerchantEvent", + "ContractRemovedFromMerchantEvent", + "MerchantNameUpdatedEvent", + "MerchantAddressLine1UpdatedEvent", + "MerchantAddressLine2UpdatedEvent", + "MerchantAddressLine3UpdatedEvent", + "MerchantAddressLine4UpdatedEvent", + "MerchantCountyUpdatedEvent", + "MerchantRegionUpdatedEvent", + "MerchantTownUpdatedEvent", + "MerchantPostalCodeUpdatedEvent", + "MerchantContactNameUpdatedEvent", + "MerchantContactEmailAddressUpdatedEvent", + "MerchantContactPhoneNumberUpdatedEvent", + "ContractCreatedEvent", + "FixedValueProductAddedToContractEvent", + "VariableValueProductAddedToContractEvent", + "TransactionFeeForProductAddedToContractEvent", + "TransactionFeeForProductDisabledEvent", + "TransactionHasBeenCompletedEvent", + "SettledMerchantFeeAddedToTransactionEvent", + "MerchantFeeSettledEvent", + "TransactionCostInformationRecordedEvent", + "FloatCreditPurchasedEvent", + "FloatCreatedForContractProductEvent", + "FloatDecreasedByTransactionEvent", + "TransactionHasStartedEvent", + "AdditionalRequestDataRecordedEvent", + "AdditionalResponseDataRecordedEvent", + "TransactionHasBeenLocallyAuthorisedEvent", + "TransactionHasBeenLocallyDeclinedEvent", + "TransactionAuthorisedByOperatorEvent", + "TransactionDeclinedByOperatorEvent", + "ProductDetailsAddedToTransactionEvent", + "TransactionSourceAddedToTransactionEvent", + "ReconciliationHasStartedEvent", + "OverallTotalsRecordedEvent", + "ReconciliationHasBeenLocallyAuthorisedEvent", + "ReconciliationHasBeenLocallyDeclinedEvent", + "ReconciliationHasCompletedEvent", + "OperatorCreatedEvent", + "OperatorNameUpdatedEvent", + "OperatorRequireCustomMerchantNumberChangedEvent", + "OperatorRequireCustomTerminalNumberChangedEvent", + "StatementCreatedEvent", + "TransactionAddedToStatementEvent", + "SettledFeeAddedToStatementEvent", + "StatementGeneratedEvent", + "SettlementCreatedForDateEvent", + "MerchantFeeAddedPendingSettlementEvent", + "SettlementCompletedEvent", + "SettlementProcessingStartedEvent", + "ImportLogCreatedEvent", + "FileAddedToImportLogEvent", + "FileCreatedEvent", + "FileLineAddedEvent", + "FileLineProcessingSuccessfulEvent", + "FileLineProcessingFailedEvent", + "FileLineProcessingIgnoredEvent", + "FileProcessingCompletedEvent" + ], + "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic": [ + "CustomerEmailReceiptRequestedEvent", + "TransactionHasBeenCompletedEvent", + "SettledMerchantFeeAddedToTransactionEvent", + "MerchantFeeSettledEvent", + "TransactionCostInformationRecordedEvent", + "FloatCreditPurchasedEvent", + "MerchantFeePendingSettlementAddedToTransactionEvent" + ], + "TransactionProcessor.BusinessLogic.EventHandling.MerchantDomainEventHandler,TransactionProcessor.BusinessLogic": [ + "CallbackReceivedEnrichedEvent", + "StatementGeneratedEvent" + ], + "TransactionProcessor.BusinessLogic.EventHandling.MerchantStatementDomainEventHandler,TransactionProcessor.BusinessLogic": [ + "TransactionHasBeenCompletedEvent", + "StatementGeneratedEvent" + ], + "TransactionProcessor.BusinessLogic.EventHandling.MerchantSettlementDomainEventHandler,TransactionProcessor.BusinessLogic": [ + "MerchantFeeSettledEvent" ] }, "EventHandlerConfigurationOrdered": { - "CallbackReceivedEnrichedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.MerchantDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "EstateCreatedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "MerchantCreatedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "ManualDepositMadeEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "WithdrawalMadeEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "AutomaticDepositMadeEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "TransactionHasStartedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "TransactionHasBeenCompletedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine", - "TransactionProcessor.BusinessLogic.EventHandling.MerchantStatementDomainEventHandler,TransactionProcessor.BusinessLogic", - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "CustomerEmailReceiptRequestedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "SettledMerchantFeeAddedToTransactionEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine", - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic" - ], - "VoucherGeneratedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "VoucherIssuedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "BarcodeAddedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "VoucherFullyRedeeemedEvent": [ - "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine" - ], - "MerchantFeeSettledEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.MerchantSettlementDomainEventHandler,TransactionProcessor.BusinessLogic", - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic", - ], - "StatementGeneratedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.MerchantStatementDomainEventHandler,TransactionProcessor.BusinessLogic", - "TransactionProcessor.BusinessLogic.EventHandling.MerchantDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "TransactionCostInformationRecordedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "FloatCreditPurchasedEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler, TransactionProcessor.BusinessLogic" - ], - "MerchantFeePendingSettlementAddedToTransactionEvent": [ - "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler,TransactionProcessor.BusinessLogic" + "TransactionProcessor.ProjectionEngine.EventHandling.EventHandler,TransactionProcessor.ProjectionEngine": [ + "EstateCreatedEvent", + "MerchantCreatedEvent", + "ManualDepositMadeEvent", + "WithdrawalMadeEvent", + "AutomaticDepositMadeEvent", + "TransactionHasStartedEvent", + "TransactionHasBeenCompletedEvent", + "SettledMerchantFeeAddedToTransactionEvent", + "VoucherGeneratedEvent", + "VoucherIssuedEvent", + "BarcodeAddedEvent", + "VoucherFullyRedeeemedEvent" ] }, "EventStateConfig": { From cbd2174a59ebfa5c7adc1cc1071b4e9217a9dcbb Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Mon, 17 Mar 2025 10:50:22 +0000 Subject: [PATCH 2/3] wip 2 --- .../DomainEventHandlerResolverTests.cs | 100 ------------------ .../TransactionProcessor.BusinessLogic.csproj | 4 +- 2 files changed, 2 insertions(+), 102 deletions(-) delete mode 100644 TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/DomainEventHandlerResolverTests.cs diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/DomainEventHandlerResolverTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/DomainEventHandlerResolverTests.cs deleted file mode 100644 index 897b3034..00000000 --- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/DomainEventHandlerResolverTests.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Moq; -using Shared.EventStore.EventHandling; -using Shouldly; -using TransactionProcessor.DomainEvents; -using TransactionProcessor.Testing; -using Xunit; - -namespace TransactionProcessor.BusinessLogic.Tests.DomainEventHandlers -{ - public class DomainEventHandlerResolverTests - { - [Fact] - public void DomainEventHandlerResolver_CanBeCreated_IsCreated() - { - Dictionary eventHandlerConfiguration = new Dictionary(); - - eventHandlerConfiguration.Add("TestEventType1", new String[] { "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler, TransactionProcessor.BusinessLogic" }); - - Mock domainEventHandler = new Mock(); - Func createDomainEventHandlerFunc = (type) => { return domainEventHandler.Object; }; - DomainEventHandlerResolver resolver = new DomainEventHandlerResolver(eventHandlerConfiguration, createDomainEventHandlerFunc); - - resolver.ShouldNotBeNull(); - } - - [Fact] - public void DomainEventHandlerResolver_CanBeCreated_InvalidEventHandlerType_ErrorThrown() - { - Dictionary eventHandlerConfiguration = new Dictionary(); - - eventHandlerConfiguration.Add("TestEventType1", new String[] { "TransactionProcessor.BusinessLogic.EventHandling.NonExistantDomainEventHandler, TransactionProcessor.BusinessLogic" }); - - Mock domainEventHandler = new Mock(); - Func createDomainEventHandlerFunc = (type) => { return domainEventHandler.Object; }; - - Should.Throw(() => new DomainEventHandlerResolver(eventHandlerConfiguration, createDomainEventHandlerFunc)); - } - - [Fact] - public void DomainEventHandlerResolver_GetDomainEventHandlers_TransactionHasBeenCompletedEvent_EventHandlersReturned() - { - String handlerTypeName = "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler, TransactionProcessor.BusinessLogic"; - Dictionary eventHandlerConfiguration = new Dictionary(); - - TransactionDomainEvents.TransactionHasBeenCompletedEvent transactionHasBeenCompletedEvent = TestData.DomainEvents.TransactionHasBeenCompletedEvent; - - eventHandlerConfiguration.Add(transactionHasBeenCompletedEvent.GetType().Name, new String[] { handlerTypeName }); - - Mock domainEventHandler = new Mock(); - Func createDomainEventHandlerFunc = (type) => { return domainEventHandler.Object; }; - - DomainEventHandlerResolver resolver = new DomainEventHandlerResolver(eventHandlerConfiguration, createDomainEventHandlerFunc); - - List handlers = resolver.GetDomainEventHandlers(transactionHasBeenCompletedEvent); - - handlers.ShouldNotBeNull(); - handlers.Any().ShouldBeTrue(); - handlers.Count.ShouldBe(1); - } - - [Fact] - public void DomainEventHandlerResolver_GetDomainEventHandlers_TransactionHasBeenCompletedEvent_EventNotConfigured_EventHandlersReturned() - { - String handlerTypeName = "TransactionProcessor.BusinessLogic.EventHandling.TransactionDomainEventHandler, TransactionProcessor.BusinessLogic"; - Dictionary eventHandlerConfiguration = new Dictionary(); - - TransactionDomainEvents.TransactionHasBeenCompletedEvent transactionHasBeenCompletedEvent = TestData.DomainEvents.TransactionHasBeenCompletedEvent; - - eventHandlerConfiguration.Add("RandomEvent", new String[] { handlerTypeName }); - Mock domainEventHandler = new Mock(); - Func createDomainEventHandlerFunc = (type) => { return domainEventHandler.Object; }; - - DomainEventHandlerResolver resolver = new DomainEventHandlerResolver(eventHandlerConfiguration, createDomainEventHandlerFunc); - - List handlers = resolver.GetDomainEventHandlers(transactionHasBeenCompletedEvent); - - handlers.ShouldBeNull(); - } - - [Fact] - public void DomainEventHandlerResolver_GetDomainEventHandlers_TransactionHasBeenCompletedEvent_NoHandlersConfigured_EventHandlersReturned() - { - Dictionary eventHandlerConfiguration = new Dictionary(); - - TransactionDomainEvents.TransactionHasBeenCompletedEvent transactionHasBeenCompletedEvent = TestData.DomainEvents.TransactionHasBeenCompletedEvent; - Mock domainEventHandler = new Mock(); - - Func createDomainEventHandlerFunc = (type) => { return domainEventHandler.Object; }; - - DomainEventHandlerResolver resolver = new DomainEventHandlerResolver(eventHandlerConfiguration, createDomainEventHandlerFunc); - - List handlers = resolver.GetDomainEventHandlers(transactionHasBeenCompletedEvent); - - handlers.ShouldBeNull(); - } - } -} \ No newline at end of file diff --git a/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj b/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj index bfa172b6..e98fb24f 100644 --- a/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj +++ b/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj @@ -17,11 +17,11 @@ - + From 94ac8b35c51432ea2ff36ec5c0cf6c59e3d64c50 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Mon, 17 Mar 2025 11:46:22 +0000 Subject: [PATCH 3/3] Nuget updates completed --- .../TransactionProcessor.Aggregates.Tests.csproj | 3 +++ ...ansactionProcessor.BusinessLogic.Tests.csproj | 3 +++ .../TransactionProcessor.BusinessLogic.csproj | 4 ++-- ...ansactionProcessor.DataTransferObjects.csproj | 2 +- .../TransactionProcessor.IntegrationTests.csproj | 3 +++ .../TransactionProcessor.Testing.csproj | 3 +++ .../TransactionProcessor.Tests.csproj | 3 +++ TransactionProcessor/TransactionProcessor.csproj | 16 ++++++++++------ 8 files changed, 28 insertions(+), 9 deletions(-) diff --git a/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj b/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj index 3287a329..7110422f 100644 --- a/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj +++ b/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj @@ -17,6 +17,9 @@ + + + all diff --git a/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj b/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj index e9204b31..db84c90b 100644 --- a/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj +++ b/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj @@ -17,6 +17,9 @@ + + + all diff --git a/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj b/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj index e98fb24f..bfa172b6 100644 --- a/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj +++ b/TransactionProcessor.BusinessLogic/TransactionProcessor.BusinessLogic.csproj @@ -17,11 +17,11 @@ - + diff --git a/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj b/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj index febb7e86..f596bd2c 100644 --- a/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj +++ b/TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj @@ -12,7 +12,7 @@ - + diff --git a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj index 0bed3dd3..4b0370a5 100644 --- a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj +++ b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj @@ -29,6 +29,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj b/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj index 4c214071..31477509 100644 --- a/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj +++ b/TransactionProcessor.Testing/TransactionProcessor.Testing.csproj @@ -10,6 +10,9 @@ + + + diff --git a/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj b/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj index 39e45248..f397cf02 100644 --- a/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj +++ b/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj @@ -18,6 +18,9 @@ + + + all diff --git a/TransactionProcessor/TransactionProcessor.csproj b/TransactionProcessor/TransactionProcessor.csproj index fd72c76a..fb240735 100644 --- a/TransactionProcessor/TransactionProcessor.csproj +++ b/TransactionProcessor/TransactionProcessor.csproj @@ -41,12 +41,16 @@ - - - - - - + + + + + + + + + +