From 8e673be6789951315ca8362085e6e41efaaf4d76 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 14 Mar 2025 06:54:39 +0000 Subject: [PATCH] Update project dependencies and refactor tests - Upgraded various packages including `Lamar`, `MediatR`, and `Microsoft.Extensions.DependencyInjection.Abstractions`. - Adjusted project files for `TransactionProcessorACL.BusinessLogic.Tests` and `TransactionProcessorACL.BusinessLogic` to enhance compatibility. - Updated generated code version in feature files from `1.0.0.0` to `2.0.0.0` for improved code generation. - Refactored test setup and teardown methods for better reliability and maintainability. - Updated `TransactionProcessorACL.csproj` with newer versions of `NLog`, `Swashbuckle.AspNetCore`, and other dependencies. - Removed outdated package references to align with the latest .NET standards. --- ...ionProcessorACL.BusinessLogic.Tests.csproj | 22 ++--- ...ansactionProcessorACL.BusinessLogic.csproj | 6 +- .../LogonTransaction.feature.cs | 73 +++++++++------- .../Reconciliation/Reconciliation.feature.cs | 85 ++++++++++-------- .../RedeemVoucher/RedeemVoucher.feature.cs | 87 ++++++++++--------- .../SalesTransaction.feature.cs | 85 ++++++++++-------- ...actionProcessorACL.IntegrationTests.csproj | 30 +++---- .../TransactionProcessorACL.Testing.csproj | 4 +- .../TransactionProcessorACL.Tests.csproj | 20 ++--- .../TransactionProcessorACL.csproj | 42 ++++----- 10 files changed, 245 insertions(+), 209 deletions(-) diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj index 149caca..54a002e 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj @@ -7,20 +7,20 @@ - - - - - - - - - - + + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj b/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj index 5b60dd7..26987ee 100644 --- a/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj +++ b/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj @@ -5,10 +5,10 @@ - + - - + + diff --git a/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs index 7ddb9d4..2142f01 100644 --- a/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/LogonTransaction/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 TransactionProcessorACL.IntegrationTests.LogonTransaction 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"), "LogonTransaction", "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"), "LogonTransaction", "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,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[] { "Merchant"}); #line 6 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"}); @@ -107,7 +116,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 10 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", @@ -134,7 +143,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 16 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", @@ -155,7 +164,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 22 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"}); @@ -163,7 +172,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor acl reso" + "urces", ((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"}); @@ -172,7 +181,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 31 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", @@ -190,7 +199,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 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[] { @@ -202,7 +211,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 41 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[] { "MerchantName", "AddressLine1", "Town", @@ -241,7 +250,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)), table9, "Given "); #line hidden - Reqnroll.Table table10 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table10 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -268,7 +277,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 52 await testRunner.GivenAsync("I have assigned the following operator to the 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[] { "EmailAddress", "Password", "GivenName", @@ -309,11 +318,11 @@ public async System.Threading.Tasks.Task LogonTransaction() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Logon Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Logon Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 65 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(); } @@ -326,9 +335,9 @@ public async System.Threading.Tasks.Task LogonTransaction() #line 66 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant1.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 1\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table12 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -348,9 +357,9 @@ public async System.Threading.Tasks.Task LogonTransaction() #line 71 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant2.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 2\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table13 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -370,9 +379,9 @@ public async System.Threading.Tasks.Task LogonTransaction() #line 76 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant3.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 3\" for Estate \"Test Estate 2\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table14 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -389,7 +398,7 @@ public async System.Threading.Tasks.Task LogonTransaction() #line 77 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table14, "When "); #line hidden - Reqnroll.Table table15 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", diff --git a/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs b/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs index 17644d4..1006c55 100644 --- a/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.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 TransactionProcessorACL.IntegrationTests.Reconciliation 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"), "Reconciliation", "Reconciliation", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "Reconciliation.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"), "Reconciliation", "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,14 +90,14 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table16 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { "Role Name"}); table16.AddRow(new string[] { "Merchant"}); #line 6 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table16, "Given "); #line hidden - Reqnroll.Table table17 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -107,7 +116,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 10 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table17, "Given "); #line hidden - Reqnroll.Table table18 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -134,7 +143,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 16 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table18, "Given "); #line hidden - Reqnroll.Table table19 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -155,7 +164,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 22 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table19, "Given "); #line hidden - Reqnroll.Table table20 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { "ClientId"}); table20.AddRow(new string[] { "serviceClient"}); @@ -163,7 +172,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor acl reso" + "urces", ((string)(null)), table20, "Given "); #line hidden - Reqnroll.Table table21 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { "EstateName"}); table21.AddRow(new string[] { "Test Estate 1"}); @@ -172,7 +181,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 31 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table21, "Given "); #line hidden - Reqnroll.Table table22 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -190,7 +199,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table22, "Given "); #line hidden - Reqnroll.Table table23 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table23.AddRow(new string[] { @@ -202,7 +211,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 41 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table23, "And "); #line hidden - Reqnroll.Table table24 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -217,7 +226,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 46 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table24, "Given "); #line hidden - Reqnroll.Table table25 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -244,7 +253,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 51 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table25, "When "); #line hidden - Reqnroll.Table table26 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -271,7 +280,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 56 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table26, "When "); #line hidden - Reqnroll.Table table27 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -310,7 +319,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 61 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table27, "Given "); #line hidden - Reqnroll.Table table28 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -337,7 +346,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 67 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table28, "Given "); #line hidden - Reqnroll.Table table29 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -356,7 +365,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 73 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table29, "Given "); #line hidden - Reqnroll.Table table30 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -375,7 +384,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 79 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table30, "When "); #line hidden - Reqnroll.Table table31 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -402,7 +411,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 85 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table31, "Given "); #line hidden - Reqnroll.Table table32 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -443,11 +452,11 @@ public async System.Threading.Tasks.Task ReconciliationTransaction() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Reconciliation Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Reconciliation Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 98 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(); } @@ -460,9 +469,9 @@ public async System.Threading.Tasks.Task ReconciliationTransaction() #line 99 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant1.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 1\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table33 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { "DateTime", "MerchantName", "DeviceIdentifier", @@ -486,9 +495,9 @@ public async System.Threading.Tasks.Task ReconciliationTransaction() #line 104 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant2.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 2\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table34 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table34 = new global::Reqnroll.Table(new string[] { "DateTime", "MerchantName", "DeviceIdentifier", @@ -512,9 +521,9 @@ public async System.Threading.Tasks.Task ReconciliationTransaction() #line 109 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant3.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 3\" for Estate \"Test Estate 2\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table35 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { "DateTime", "MerchantName", "DeviceIdentifier", @@ -535,7 +544,7 @@ public async System.Threading.Tasks.Task ReconciliationTransaction() #line 110 await testRunner.WhenAsync("I perform the following reconciliations", ((string)(null)), table35, "When "); #line hidden - Reqnroll.Table table36 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", diff --git a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs index 5c95435..ff0d646 100644 --- a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/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 TransactionProcessorACL.IntegrationTests.RedeemVoucher 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"), "RedeemVoucher", "RedeemVoucher", null, 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"), "RedeemVoucher", "RedeemVoucher", 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 table37 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { "Role Name"}); table37.AddRow(new string[] { "Merchant"}); @@ -90,7 +99,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 6 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table37, "Given "); #line hidden - Reqnroll.Table table38 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -113,7 +122,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 11 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table38, "Given "); #line hidden - Reqnroll.Table table39 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -146,7 +155,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 18 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table39, "Given "); #line hidden - Reqnroll.Table table40 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -173,7 +182,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 25 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table40, "Given "); #line hidden - Reqnroll.Table table41 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { "ClientId"}); table41.AddRow(new string[] { "serviceClient"}); @@ -181,7 +190,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor acl reso" + "urces", ((string)(null)), table41, "Given "); #line hidden - Reqnroll.Table table42 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { "EstateName"}); table42.AddRow(new string[] { "Test Estate 1"}); @@ -190,7 +199,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 35 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table42, "Given "); #line hidden - Reqnroll.Table table43 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { "Email Address", "Password", "Given Name", @@ -214,7 +223,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 40 await testRunner.GivenAsync("I have created the following security users for voucher redemption", ((string)(null)), table43, "Given "); #line hidden - Reqnroll.Table table44 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table44 = 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 45 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table44, "Given "); #line hidden - Reqnroll.Table table45 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table45.AddRow(new string[] { @@ -244,7 +253,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 50 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table45, "And "); #line hidden - Reqnroll.Table table46 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -259,7 +268,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 55 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table46, "Given "); #line hidden - Reqnroll.Table table47 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -286,7 +295,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 60 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table47, "When "); #line hidden - Reqnroll.Table table48 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -316,7 +325,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 65 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table48, "Given "); #line hidden - Reqnroll.Table table49 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -337,7 +346,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 70 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table49, "Given "); #line hidden - Reqnroll.Table table50 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -352,7 +361,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 75 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table50, "Given "); #line hidden - Reqnroll.Table table51 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -367,7 +376,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 80 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table51, "When "); #line hidden - Reqnroll.Table table52 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -388,7 +397,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 85 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table52, "Given "); #line hidden - Reqnroll.Table table53 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -415,9 +424,9 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 95 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant1.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 1\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table54 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -461,9 +470,9 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 101 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant2.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 2\" for Estate \"Test Estate 2\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table55 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -514,11 +523,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 108 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(); } @@ -530,19 +539,19 @@ public async System.Threading.Tasks.Task RedeemVouchers() #line hidden #line 109 await testRunner.GivenAsync("I am logged in as \"redemptionuser@testredemption1.co.uk\" with password \"123456\" f" + - "or Estate \"Test Estate 1\" with client \"redemptionClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "or Estate \"Test Estate 1\" with client \"redemptionClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden #line 111 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 #line 113 await testRunner.GivenAsync("I am logged in as \"redemptionuser@testredemption2.co.uk\" with password \"123456\" f" + - "or Estate \"Test Estate 2\" with client \"redemptionClient\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "or Estate \"Test Estate 2\" with client \"redemptionClient\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden #line 115 await testRunner.WhenAsync("I redeem the voucher for Estate \'Test Estate 2\' and Merchant \'Test Merchant 2\' tr" + - "ansaction number 2 the voucher balance will be 0", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "ansaction number 2 the voucher balance will be 0", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs index ff36729..9a395b0 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.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 TransactionProcessorACL.IntegrationTests.SaleTransaction 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("SalesTransaction")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class SalesTransactionFeature { - 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"), "SaleTransaction", "SalesTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "SalesTransaction.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"), "SaleTransaction", "SalesTransaction", 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 table56 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { "Role Name"}); table56.AddRow(new string[] { "Merchant"}); #line 6 await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table56, "Given "); #line hidden - Reqnroll.Table table57 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -111,7 +120,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 10 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table57, "Given "); #line hidden - Reqnroll.Table table58 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -144,7 +153,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 17 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table58, "Given "); #line hidden - Reqnroll.Table table59 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -165,7 +174,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 24 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table59, "Given "); #line hidden - Reqnroll.Table table60 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { "ClientId"}); table60.AddRow(new string[] { "serviceClient"}); @@ -173,7 +182,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() await testRunner.GivenAsync("I have a token to access the estate management and transaction processor acl reso" + "urces", ((string)(null)), table60, "Given "); #line hidden - Reqnroll.Table table61 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { "EstateName"}); table61.AddRow(new string[] { "Test Estate 1"}); @@ -182,7 +191,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 33 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table61, "Given "); #line hidden - Reqnroll.Table table62 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -210,7 +219,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 38 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table62, "Given "); #line hidden - Reqnroll.Table table63 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table63.AddRow(new string[] { @@ -228,7 +237,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 45 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table63, "And "); #line hidden - Reqnroll.Table table64 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table64 = 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 52 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table64, "Given "); #line hidden - Reqnroll.Table table65 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -294,7 +303,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 59 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table65, "When "); #line hidden - Reqnroll.Table table66 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -321,7 +330,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 66 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table66, "When "); #line hidden - Reqnroll.Table table67 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -360,7 +369,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 71 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table67, "Given "); #line hidden - Reqnroll.Table table68 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -405,7 +414,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 77 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table68, "Given "); #line hidden - Reqnroll.Table table69 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -424,7 +433,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 86 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((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", "MerchantName", "ContractDescription"}); @@ -455,7 +464,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 92 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table70, "When "); #line hidden - Reqnroll.Table table71 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -482,7 +491,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 101 await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table71, "Given "); #line hidden - Reqnroll.Table table72 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { "EmailAddress", "Password", "GivenName", @@ -523,11 +532,11 @@ public async System.Threading.Tasks.Task SaleTransaction() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Sale Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Sale Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 114 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(); } @@ -540,9 +549,9 @@ public async System.Threading.Tasks.Task SaleTransaction() #line 115 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant1.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 1\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table73 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -608,9 +617,9 @@ public async System.Threading.Tasks.Task SaleTransaction() #line 122 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant2.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 2\" for Estate \"Test Estate 1\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table74 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -661,9 +670,9 @@ public async System.Threading.Tasks.Task SaleTransaction() #line 128 await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant3.co.uk\" with password \"123456\" for M" + "erchant \"Test Merchant 3\" for Estate \"Test Estate 2\" with client \"merchantClient" + - "\"", ((string)(null)), ((Reqnroll.Table)(null)), "Given "); + "\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); #line hidden - Reqnroll.Table table75 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { "DateTime", "TransactionNumber", "TransactionType", @@ -711,7 +720,7 @@ public async System.Threading.Tasks.Task SaleTransaction() #line 129 await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table75, "When "); #line hidden - Reqnroll.Table table76 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "TransactionNumber", diff --git a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj index b23a2fb..3315785 100644 --- a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj +++ b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj @@ -7,26 +7,26 @@ - + - - - - - - - - - + + + + + + + + + - - - - + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj b/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj index da8603c..db715dd 100644 --- a/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj +++ b/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj index d140a41..dc22bcd 100644 --- a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj +++ b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj @@ -7,19 +7,19 @@ - - - - - - - - - + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessorACL/TransactionProcessorACL.csproj b/TransactionProcessorACL/TransactionProcessorACL.csproj index daab06f..2bd3301 100644 --- a/TransactionProcessorACL/TransactionProcessorACL.csproj +++ b/TransactionProcessorACL/TransactionProcessorACL.csproj @@ -11,29 +11,29 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + +