From ce499a255a3476d24c6d30a7ca44c408629d8c41 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 14 Mar 2025 06:40:56 +0000 Subject: [PATCH 1/3] Update dependencies and improve project structure - Upgraded various project files to use newer versions of dependencies, including Entity Framework Core, NUnit, Moq, Shouldly, and others. - Added new package references like `Microsoft.Extensions.DependencyInjection.Abstractions` to enhance dependency injection. - Removed outdated package references for better compatibility. - Modified generated code attributes in feature files to reflect the updated Reqnroll tool version. - Adjusted feature file structures for improved clarity and maintainability. - Updated `appsettings.json` to correct event handler configurations. - Enhanced logging capabilities by updating the `NLog` package. - These changes modernize the codebase and improve test reliability. --- .../FileProcessor.BusinessLogic.Tests.csproj | 18 +-- .../FileProcessor.BusinessLogic.csproj | 21 ++-- .../FileProcessor.Client.csproj | 4 +- .../FileProcessor.File.DomainEvents.csproj | 2 +- .../FileProcessor.FileAggregate.Tests.csproj | 10 +- .../FileProcessor.FileAggregate.csproj | 7 +- ...rocessor.FileImportLog.DomainEvents.csproj | 2 +- ...cessor.FileImportLogAggregate.Tests.csproj | 10 +- ...ileProcessor.FileImportLogAggregate.csproj | 5 +- ...rocessor.IntegrationTesting.Helpers.csproj | 4 +- .../Features/GetFileImportDetails.feature.cs | 95 +++++++------- .../Features/ProcessTopupCSV.feature.cs | 119 ++++++++++-------- .../Features/ProcessVoucherCSV.feature.cs | 111 ++++++++-------- .../FileProcessor.IntegrationTests.csproj | 28 ++--- .../FileProcessor.Tests.csproj | 16 +-- FileProcessor/FileProcessor.csproj | 44 +++---- FileProcessor/appsettings.json | 8 +- 17 files changed, 266 insertions(+), 238 deletions(-) diff --git a/FileProcessor.BusinessLogic.Tests/FileProcessor.BusinessLogic.Tests.csproj b/FileProcessor.BusinessLogic.Tests/FileProcessor.BusinessLogic.Tests.csproj index 455bc07..309dfa5 100644 --- a/FileProcessor.BusinessLogic.Tests/FileProcessor.BusinessLogic.Tests.csproj +++ b/FileProcessor.BusinessLogic.Tests/FileProcessor.BusinessLogic.Tests.csproj @@ -7,18 +7,18 @@ - - - - - - - - + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj b/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj index 8e7ec4c..6f1dec0 100644 --- a/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj +++ b/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj @@ -5,17 +5,18 @@ - + + - - - - - - - - - + + + + + + + + + diff --git a/FileProcessor.Client/FileProcessor.Client.csproj b/FileProcessor.Client/FileProcessor.Client.csproj index b0c5b99..bf52219 100644 --- a/FileProcessor.Client/FileProcessor.Client.csproj +++ b/FileProcessor.Client/FileProcessor.Client.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/FileProcessor.File.DomainEvents/FileProcessor.File.DomainEvents.csproj b/FileProcessor.File.DomainEvents/FileProcessor.File.DomainEvents.csproj index e4ea0f7..b692b80 100644 --- a/FileProcessor.File.DomainEvents/FileProcessor.File.DomainEvents.csproj +++ b/FileProcessor.File.DomainEvents/FileProcessor.File.DomainEvents.csproj @@ -6,7 +6,7 @@ - + diff --git a/FileProcessor.FileAggregate.Tests/FileProcessor.FileAggregate.Tests.csproj b/FileProcessor.FileAggregate.Tests/FileProcessor.FileAggregate.Tests.csproj index 91c07a9..bee6ac8 100644 --- a/FileProcessor.FileAggregate.Tests/FileProcessor.FileAggregate.Tests.csproj +++ b/FileProcessor.FileAggregate.Tests/FileProcessor.FileAggregate.Tests.csproj @@ -7,14 +7,14 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj b/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj index a5d1b2c..519f1b6 100644 --- a/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj +++ b/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj @@ -5,9 +5,10 @@ - - - + + + + diff --git a/FileProcessor.FileImportLog.DomainEvents/FileProcessor.FileImportLog.DomainEvents.csproj b/FileProcessor.FileImportLog.DomainEvents/FileProcessor.FileImportLog.DomainEvents.csproj index 8bdddc8..a619820 100644 --- a/FileProcessor.FileImportLog.DomainEvents/FileProcessor.FileImportLog.DomainEvents.csproj +++ b/FileProcessor.FileImportLog.DomainEvents/FileProcessor.FileImportLog.DomainEvents.csproj @@ -6,7 +6,7 @@ - + diff --git a/FileProcessor.FileImportLogAggregate.Tests/FileProcessor.FileImportLogAggregate.Tests.csproj b/FileProcessor.FileImportLogAggregate.Tests/FileProcessor.FileImportLogAggregate.Tests.csproj index 4b413f2..56bf77f 100644 --- a/FileProcessor.FileImportLogAggregate.Tests/FileProcessor.FileImportLogAggregate.Tests.csproj +++ b/FileProcessor.FileImportLogAggregate.Tests/FileProcessor.FileImportLogAggregate.Tests.csproj @@ -7,14 +7,14 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj b/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj index 07d7be8..33ff03d 100644 --- a/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj +++ b/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj @@ -5,8 +5,9 @@ - - + + + diff --git a/FileProcessor.IntegrationTesting.Helpers/FileProcessor.IntegrationTesting.Helpers.csproj b/FileProcessor.IntegrationTesting.Helpers/FileProcessor.IntegrationTesting.Helpers.csproj index cb9f55b..30a718c 100644 --- a/FileProcessor.IntegrationTesting.Helpers/FileProcessor.IntegrationTesting.Helpers.csproj +++ b/FileProcessor.IntegrationTesting.Helpers/FileProcessor.IntegrationTesting.Helpers.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs index 4b435e4..ea48544 100644 --- a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs +++ b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.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,53 +17,62 @@ namespace FileProcessor.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("GetFileImportDetails")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] [NUnit.Framework.CategoryAttribute("getfileimportdetails")] public partial class GetFileImportDetailsFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared", "getfileimportdetails"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "GetFileImportDetails", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "GetFileImportDetails.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", "GetFileImportDetails", 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); @@ -83,7 +92,7 @@ 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[] { "Name", "DisplayName", "Description"}); @@ -106,7 +115,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 5 await testRunner.GivenAsync("I create the following api scopes", ((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", "Secret", @@ -139,7 +148,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 12 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table2, "Given "); #line hidden - Reqnroll.Table table3 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table3 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -154,7 +163,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 19 await testRunner.GivenAsync("the following clients 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"}); table4.AddRow(new string[] { "serviceClient"}); @@ -162,14 +171,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)), table4, "Given "); #line hidden - Reqnroll.Table table5 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "EstateName"}); table5.AddRow(new string[] { "Test Estate 1"}); #line 27 await testRunner.GivenAsync("I have created the following estates", ((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", "OperatorName", "RequireCustomMerchantNumber", @@ -187,7 +196,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 31 await testRunner.GivenAsync("I have created the following operators", ((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"}); table7.AddRow(new string[] { @@ -199,7 +208,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table7, "And "); #line hidden - Reqnroll.Table table8 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -214,7 +223,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 41 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table8, "Given "); #line hidden - Reqnroll.Table table9 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -241,7 +250,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 46 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table9, "When "); #line hidden - Reqnroll.Table table10 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table10 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -260,7 +269,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 51 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table10, "When "); #line hidden - Reqnroll.Table table11 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table11 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -290,7 +299,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 55 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table11, "Given "); #line hidden - Reqnroll.Table table12 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -323,7 +332,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)), table12, "Given "); #line hidden - Reqnroll.Table table13 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -338,7 +347,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 67 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table13, "Given "); #line hidden - Reqnroll.Table table14 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -361,7 +370,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)), table14, "When "); #line hidden - Reqnroll.Table table15 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -392,11 +401,11 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Get File Import Log Details", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get File Import Log Details", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 85 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(); } @@ -406,7 +415,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table16 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -425,7 +434,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 86 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table16, "Given "); #line hidden - Reqnroll.Table table17 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -438,7 +447,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 91 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table17, "And "); #line hidden - Reqnroll.Table table18 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -457,7 +466,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 95 await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table18, "Given "); #line hidden - Reqnroll.Table table19 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -470,7 +479,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 100 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table19, "And "); #line hidden - Reqnroll.Table table20 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -498,7 +507,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 104 await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((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", "MerchantName", "FileProfileId", @@ -511,7 +520,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() #line 110 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table21, "And "); #line hidden - Reqnroll.Table table22 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { "ImportLogDate", "FileCount"}); table22.AddRow(new string[] { @@ -521,7 +530,7 @@ public async System.Threading.Tasks.Task GetFileImportLogDetails() await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Yesterday\' and \'Today\' the followi" + "ng data is returned", ((string)(null)), table22, "When "); #line hidden - Reqnroll.Table table23 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { "MerchantName", "OriginalFileName"}); table23.AddRow(new string[] { @@ -537,7 +546,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye await testRunner.WhenAsync("I get the \'Test Estate 1\' import log for \'Today\' the following file information i" + "s returned", ((string)(null)), table23, "When "); #line hidden - Reqnroll.Table table24 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { "ProcessingCompleted", "NumberOfLines", "TotaLines", @@ -557,7 +566,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye await testRunner.WhenAsync("I get the file \'SafarcomTopup1.txt\' for Estate \'Test Estate 1\' the following file" + " information is returned", ((string)(null)), table24, "When "); #line hidden - Reqnroll.Table table25 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "LineNumber", "Data", "Result"}); @@ -577,7 +586,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye await testRunner.WhenAsync("I get the file \'SafarcomTopup1.txt\' for Estate \'Test Estate 1\' the following file" + " lines are returned", ((string)(null)), table25, "When "); #line hidden - Reqnroll.Table table26 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "ProcessingCompleted", "NumberOfLines", "TotaLines", @@ -597,7 +606,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye await testRunner.WhenAsync("I get the file \'SafarcomTopup2.txt\' for Estate \'Test Estate 1\' the following file" + " information is returned", ((string)(null)), table26, "When "); #line hidden - Reqnroll.Table table27 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "LineNumber", "Data", "Result"}); @@ -617,7 +626,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye await testRunner.WhenAsync("I get the file \'SafarcomTopup2.txt\' for Estate \'Test Estate 1\' the following file" + " lines are returned", ((string)(null)), table27, "When "); #line hidden - Reqnroll.Table table28 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { "ProcessingCompleted", "NumberOfLines", "TotaLines", @@ -637,7 +646,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye await testRunner.WhenAsync("I get the file \'VoucherIssue1.txt\' for Estate \'Test Estate 1\' the following file " + "information is returned", ((string)(null)), table28, "When "); #line hidden - Reqnroll.Table table29 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { "LineNumber", "Data", "Result"}); diff --git a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs index 263664b..59b87c0 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs +++ b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.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 FileProcessor.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("Process Topup CSV Files")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] public partial class ProcessTopupCSVFilesFeature { - 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", "Process Topup CSV Files", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "ProcessTopupCSV.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", "Process Topup CSV Files", 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 table30 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -104,7 +113,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 5 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table30, "Given "); #line hidden - Reqnroll.Table table31 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -137,7 +146,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 12 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table31, "Given "); #line hidden - Reqnroll.Table table32 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -152,7 +161,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 19 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table32, "Given "); #line hidden - Reqnroll.Table table33 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { "ClientId"}); table33.AddRow(new string[] { "serviceClient"}); @@ -160,14 +169,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)), table33, "Given "); #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 27 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table34, "Given "); #line hidden - Reqnroll.Table table35 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -185,7 +194,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 31 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table35, "Given "); #line hidden - Reqnroll.Table table36 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table36.AddRow(new string[] { @@ -197,7 +206,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table36, "And "); #line hidden - Reqnroll.Table table37 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -212,7 +221,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 41 await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table37, "Given "); #line hidden - Reqnroll.Table table38 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -239,7 +248,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 46 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table38, "When "); #line hidden - Reqnroll.Table table39 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -258,7 +267,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 51 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table39, "When "); #line hidden - Reqnroll.Table table40 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -279,7 +288,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 55 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table40, "Given "); #line hidden - Reqnroll.Table table41 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -300,7 +309,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 59 await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table41, "Given "); #line hidden - Reqnroll.Table table42 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -311,7 +320,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 64 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table42, "Given "); #line hidden - Reqnroll.Table table43 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -326,7 +335,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 68 await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table43, "When "); #line hidden - Reqnroll.Table table44 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", @@ -349,11 +358,11 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWith1DetailRow { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Safaricom Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Safaricom Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 77 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(); } @@ -363,7 +372,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWith1DetailRow #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table45 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -382,7 +391,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWith1DetailRow #line 78 await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table45, "Given "); #line hidden - Reqnroll.Table table46 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -405,11 +414,11 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWith2DetailRow { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Safaricom Topup File with 2 detail rows", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Safaricom Topup File with 2 detail rows", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 89 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(); } @@ -419,7 +428,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWith2DetailRow #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table47 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -442,7 +451,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWith2DetailRow #line 90 await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((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", "MerchantName", "FileProfileId", @@ -465,11 +474,11 @@ public async System.Threading.Tasks.Task Process2SafaricomTopupFiles() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process 2 Safaricom Topup Files", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process 2 Safaricom Topup Files", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 102 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(); } @@ -479,7 +488,7 @@ public async System.Threading.Tasks.Task Process2SafaricomTopupFiles() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table49 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -498,7 +507,7 @@ public async System.Threading.Tasks.Task Process2SafaricomTopupFiles() #line 103 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((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", "MerchantName", "FileProfileId", @@ -511,7 +520,7 @@ public async System.Threading.Tasks.Task Process2SafaricomTopupFiles() #line 108 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table50, "And "); #line hidden - Reqnroll.Table table51 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -534,7 +543,7 @@ public async System.Threading.Tasks.Task Process2SafaricomTopupFiles() #line 112 await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table51, "Given "); #line hidden - Reqnroll.Table table52 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -559,11 +568,11 @@ public async System.Threading.Tasks.Task ProcessDuplicateSafaricomTopupFileWith1 string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Duplicate Safaricom Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Duplicate Safaricom Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 125 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(); } @@ -573,7 +582,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateSafaricomTopupFileWith1 #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[] { "Column1", "Column2", "Column3"}); @@ -596,7 +605,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateSafaricomTopupFileWith1 #line 126 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table53, "Given "); #line hidden - Reqnroll.Table table54 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -609,7 +618,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateSafaricomTopupFileWith1 #line 132 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table54, "And "); #line hidden - Reqnroll.Table table55 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -632,7 +641,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateSafaricomTopupFileWith1 #line 138 await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table55, "Given "); #line hidden - Reqnroll.Table table56 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -656,11 +665,11 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDate { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Safaricom Topup File with Upload Date Time", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Safaricom Topup File with Upload Date Time", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 150 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(); } @@ -670,7 +679,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDate #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table57 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -689,7 +698,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDate #line 151 await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table57, "Given "); #line hidden - Reqnroll.Table table58 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -706,9 +715,9 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDate #line hidden #line 160 await testRunner.WhenAsync("I get the import log for estate \'Test Estate 1\' the date on the import log is \'To" + - "day\'", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "day\'", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden - Reqnroll.Table table59 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); @@ -727,7 +736,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDate #line 162 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table59, "Given "); #line hidden - Reqnroll.Table table60 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -744,7 +753,7 @@ public async System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDate #line hidden #line 171 await testRunner.WhenAsync("I get the import log for estate \'Test Estate 1\' the date on the import log is \'01" + - "/09/2021\'", ((string)(null)), ((Reqnroll.Table)(null)), "When "); + "/09/2021\'", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs index 82b9098..b0a4166 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs +++ b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.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,53 +17,62 @@ namespace FileProcessor.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("Process Voucher CSV Files")] + [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] [NUnit.Framework.CategoryAttribute("base")] [NUnit.Framework.CategoryAttribute("shared")] [NUnit.Framework.CategoryAttribute("processvouchercsv")] public partial class ProcessVoucherCSVFilesFeature { - private Reqnroll.ITestRunner testRunner; + private global::Reqnroll.ITestRunner testRunner; private static string[] featureTags = new string[] { "base", "shared", "processvouchercsv"}; + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "Process Voucher CSV Files", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + #line 1 "ProcessVoucherCSV.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", "Process Voucher CSV Files", 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); @@ -83,7 +92,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden - Reqnroll.Table table61 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); @@ -106,7 +115,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 5 await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table61, "Given "); #line hidden - Reqnroll.Table table62 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", @@ -139,7 +148,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 12 await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table62, "Given "); #line hidden - Reqnroll.Table table63 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", @@ -154,7 +163,7 @@ public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() #line 19 await testRunner.GivenAsync("the following clients exist", ((string)(null)), table63, "Given "); #line hidden - Reqnroll.Table table64 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { "ClientId"}); table64.AddRow(new string[] { "serviceClient"}); @@ -162,14 +171,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)), table64, "Given "); #line hidden - Reqnroll.Table table65 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { "EstateName"}); table65.AddRow(new string[] { "Test Estate 1"}); #line 27 await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table65, "Given "); #line hidden - Reqnroll.Table table66 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", @@ -187,7 +196,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 31 await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table66, "Given "); #line hidden - Reqnroll.Table table67 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); table67.AddRow(new string[] { @@ -199,7 +208,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 36 await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table67, "And "); #line hidden - Reqnroll.Table table68 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); @@ -214,7 +223,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 41 await testRunner.GivenAsync("I create a contract with the following values", ((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", "OperatorName", "ContractDescription", @@ -241,7 +250,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 46 await testRunner.WhenAsync("I create the following Products", ((string)(null)), table69, "When "); #line hidden - Reqnroll.Table table70 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -268,7 +277,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 51 await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table70, "When "); #line hidden - Reqnroll.Table table71 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -289,7 +298,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 56 await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table71, "Given "); #line hidden - Reqnroll.Table table72 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", @@ -310,7 +319,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)), table72, "Given "); #line hidden - Reqnroll.Table table73 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); @@ -321,7 +330,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 65 await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table73, "Given "); #line hidden - Reqnroll.Table table74 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); @@ -336,7 +345,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 69 await testRunner.WhenAsync("I add the following contracts to 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[] { "Reference", "Amount", "DateTime", @@ -359,11 +368,11 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForReci { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Voucher File with 1 detail row for recipient email", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Voucher File with 1 detail row for recipient email", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 78 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(); } @@ -373,7 +382,7 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForReci #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table76 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -396,7 +405,7 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForReci #line 79 await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table76, "Given "); #line hidden - Reqnroll.Table table77 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -419,11 +428,11 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForReci { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Voucher File with 1 detail row for recipient mobile", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Voucher File with 1 detail row for recipient mobile", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 90 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(); } @@ -433,7 +442,7 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForReci #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table78 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -456,7 +465,7 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForReci #line 91 await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table78, "Given "); #line hidden - Reqnroll.Table table79 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -479,11 +488,11 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith2DetailRows() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Voucher File with 2 detail rows", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Voucher File with 2 detail rows", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 102 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(); } @@ -493,7 +502,7 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith2DetailRows() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table80 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -521,7 +530,7 @@ public async System.Threading.Tasks.Task ProcessVoucherFileWith2DetailRows() #line 103 await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table80, "Given "); #line hidden - Reqnroll.Table table81 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -544,11 +553,11 @@ public async System.Threading.Tasks.Task Process2VoucherFiles() { string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process 2 Voucher Files", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process 2 Voucher Files", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 115 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(); } @@ -558,7 +567,7 @@ public async System.Threading.Tasks.Task Process2VoucherFiles() #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table82 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -586,7 +595,7 @@ public async System.Threading.Tasks.Task Process2VoucherFiles() #line 116 await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table82, "Given "); #line hidden - Reqnroll.Table table83 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -599,7 +608,7 @@ public async System.Threading.Tasks.Task Process2VoucherFiles() #line 122 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table83, "And "); #line hidden - Reqnroll.Table table84 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -627,7 +636,7 @@ public async System.Threading.Tasks.Task Process2VoucherFiles() #line 126 await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table84, "Given "); #line hidden - Reqnroll.Table table85 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -652,11 +661,11 @@ public async System.Threading.Tasks.Task ProcessDuplicateVoucherTopupFileWith1De string[] tagsOfScenario = new string[] { "PRTest"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - Reqnroll.ScenarioInfo scenarioInfo = new Reqnroll.ScenarioInfo("Process Duplicate Voucher Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags); + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Duplicate Voucher Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 139 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(); } @@ -666,7 +675,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateVoucherTopupFileWith1De #line 4 await this.FeatureBackgroundAsync(); #line hidden - Reqnroll.Table table86 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table86 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -694,7 +703,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateVoucherTopupFileWith1De #line 140 await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table86, "Given "); #line hidden - Reqnroll.Table table87 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", @@ -707,7 +716,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateVoucherTopupFileWith1De #line 146 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table87, "And "); #line hidden - Reqnroll.Table table88 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", @@ -735,7 +744,7 @@ public async System.Threading.Tasks.Task ProcessDuplicateVoucherTopupFileWith1De #line 152 await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table88, "Given "); #line hidden - Reqnroll.Table table89 = new Reqnroll.Table(new string[] { + global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", diff --git a/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj b/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj index 9c91ef6..c121a59 100644 --- a/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj +++ b/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj @@ -13,23 +13,23 @@ - + - - - - - - - + + + + + + + - - - - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/FileProcessor.Tests/FileProcessor.Tests.csproj b/FileProcessor.Tests/FileProcessor.Tests.csproj index 522e210..e3905be 100644 --- a/FileProcessor.Tests/FileProcessor.Tests.csproj +++ b/FileProcessor.Tests/FileProcessor.Tests.csproj @@ -7,17 +7,17 @@ - - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/FileProcessor/FileProcessor.csproj b/FileProcessor/FileProcessor.csproj index b864873..94e3d8b 100644 --- a/FileProcessor/FileProcessor.csproj +++ b/FileProcessor/FileProcessor.csproj @@ -6,29 +6,29 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + diff --git a/FileProcessor/appsettings.json b/FileProcessor/appsettings.json index 39d4b0f..36ce9ad 100644 --- a/FileProcessor/appsettings.json +++ b/FileProcessor/appsettings.json @@ -23,11 +23,9 @@ "ClientId": "serviceClient", "ClientSecret": "d192cbc46d834d0da90e8a9d50ded543", "EventHandlerConfiguration": { - "FileAddedToImportLogEvent": [ - "FileProcessor.BusinessLogic.EventHandling.FileDomainEventHandler,FileProcessor.BusinessLogic" - ], - "FileLineAddedEvent": [ - "FileProcessor.BusinessLogic.EventHandling.FileDomainEventHandler,FileProcessor.BusinessLogic" + "FileProcessor.BusinessLogic.EventHandling.FileDomainEventHandler,FileProcessor.BusinessLogic": [ + "FileAddedToImportLogEvent", + "FileLineAddedEvent" ] }, "TemporaryFileLocation": "/home/txnproc/bulkfiles/temporary", From 8244a3e019fa2dd982464be727fd9f7730df8d28 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 14 Mar 2025 06:46:15 +0000 Subject: [PATCH 2/3] Remove all tests and dependencies from test project This commit removes all test methods from `FileAggregateDomainEventTests.cs` and `FileImportLogAggregateDomainEventTests.cs`, resulting in a significant reduction in test coverage for domain events related to file processing and import logs. Additionally, all package and project references have been removed from `FileProcessor.DomainEvents.Tests.csproj`, leaving the test project without necessary dependencies. --- .../FileAggregateDomainEventTests.cs | 108 ------------------ .../FileImportLogAggregateDomainEventTests.cs | 40 ------- .../FileProcessor.DomainEvents.Tests.csproj | 29 ----- 3 files changed, 177 deletions(-) delete mode 100644 FileProcessor.DomainEvents.Tests/FileAggregateDomainEventTests.cs delete mode 100644 FileProcessor.DomainEvents.Tests/FileImportLogAggregateDomainEventTests.cs delete mode 100644 FileProcessor.DomainEvents.Tests/FileProcessor.DomainEvents.Tests.csproj diff --git a/FileProcessor.DomainEvents.Tests/FileAggregateDomainEventTests.cs b/FileProcessor.DomainEvents.Tests/FileAggregateDomainEventTests.cs deleted file mode 100644 index 9784e65..0000000 --- a/FileProcessor.DomainEvents.Tests/FileAggregateDomainEventTests.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using Xunit; - -namespace FileProcessor.DomainEvents.Tests -{ - using File.DomainEvents; - using Shouldly; - using Testing; - - public class FileAggregateDomainEventTests - { - [Fact] - public void FileCreatedEvent_CanBeCreated_IsCreated() - { - FileCreatedEvent fileCreatedEvent = new FileCreatedEvent(TestData.FileId, - TestData.FileImportLogId, - TestData.EstateId, - TestData.MerchantId, - TestData.UserId, - TestData.FileProfileId, - TestData.FileLocation, - TestData.FileUploadedDateTime, - TestData.SafaricomOperatorId); - - fileCreatedEvent.FileId.ShouldBe(TestData.FileId); - fileCreatedEvent.FileImportLogId.ShouldBe(TestData.FileImportLogId); - fileCreatedEvent.EstateId.ShouldBe(TestData.EstateId); - fileCreatedEvent.MerchantId.ShouldBe(TestData.MerchantId); - fileCreatedEvent.UserId.ShouldBe(TestData.UserId); - fileCreatedEvent.FileProfileId.ShouldBe(TestData.FileProfileId); - fileCreatedEvent.FileLocation.ShouldBe(TestData.FileLocation); - fileCreatedEvent.FileReceivedDateTime.ShouldBe(TestData.FileUploadedDateTime); - fileCreatedEvent.OperatorId.ShouldBe(TestData.SafaricomOperatorId); - } - - [Fact] - public void FileLineAddedEvent_CanBeCreated_IsCreated() - { - FileLineAddedEvent fileLineAddedEvent = new FileLineAddedEvent(TestData.FileId, TestData.EstateId, TestData.MerchantId, TestData.LineNumber, TestData.FileLine); - - fileLineAddedEvent.FileLine.ShouldBe(TestData.FileLine); - fileLineAddedEvent.EstateId.ShouldBe(TestData.EstateId); - fileLineAddedEvent.FileId.ShouldBe(TestData.FileId); - fileLineAddedEvent.LineNumber.ShouldBe(TestData.LineNumber); - } - - [Fact] - public void FileLineProcessingSuccessfulEvent_CanBeCreated_IsCreated() - { - FileLineProcessingSuccessfulEvent fileLineProcessingSuccessfulEvent = - new FileLineProcessingSuccessfulEvent(TestData.FileId, TestData.EstateId, TestData.MerchantId, TestData.LineNumber, TestData.TransactionId); - - fileLineProcessingSuccessfulEvent.FileId.ShouldBe(TestData.FileId); - fileLineProcessingSuccessfulEvent.LineNumber.ShouldBe(TestData.LineNumber); - fileLineProcessingSuccessfulEvent.TransactionId.ShouldBe(TestData.TransactionId); - fileLineProcessingSuccessfulEvent.EstateId.ShouldBe(TestData.EstateId); - } - - [Fact] - public void FileLineProcessingFailedEvent_CanBeCreated_IsCreated() - { - FileLineProcessingFailedEvent fileLineProcessingFailedEvent = - new FileLineProcessingFailedEvent(TestData.FileId, TestData.EstateId, TestData.MerchantId, TestData.LineNumber, TestData.TransactionId, - TestData.ResponseCode, TestData.ResponseMessage); - - fileLineProcessingFailedEvent.FileId.ShouldBe(TestData.FileId); - fileLineProcessingFailedEvent.LineNumber.ShouldBe(TestData.LineNumber); - fileLineProcessingFailedEvent.TransactionId.ShouldBe(TestData.TransactionId); - fileLineProcessingFailedEvent.EstateId.ShouldBe(TestData.EstateId); - fileLineProcessingFailedEvent.ResponseCode.ShouldBe(TestData.ResponseCode); - fileLineProcessingFailedEvent.ResponseMessage.ShouldBe(TestData.ResponseMessage); - } - - [Fact] - public void FileLineProcessingIgnoredEvent_CanBeCreated_IsCreated() - { - FileLineProcessingIgnoredEvent fileLineProcessingIgnoredEvent = - new FileLineProcessingIgnoredEvent(TestData.FileId, TestData.EstateId, TestData.MerchantId, TestData.LineNumber); - - fileLineProcessingIgnoredEvent.FileId.ShouldBe(TestData.FileId); - fileLineProcessingIgnoredEvent.LineNumber.ShouldBe(TestData.LineNumber); - fileLineProcessingIgnoredEvent.EstateId.ShouldBe(TestData.EstateId); - } - - [Fact] - public void FileLineProcessingRejectedEvent_CanBeCreated_IsCreated() - { - FileLineProcessingRejectedEvent fileLineProcessingRejectedEvent = - new FileLineProcessingRejectedEvent(TestData.FileId, TestData.EstateId,TestData.MerchantId, TestData.LineNumber, TestData.RejectionReason); - - fileLineProcessingRejectedEvent.FileId.ShouldBe(TestData.FileId); - fileLineProcessingRejectedEvent.LineNumber.ShouldBe(TestData.LineNumber); - fileLineProcessingRejectedEvent.EstateId.ShouldBe(TestData.EstateId); - fileLineProcessingRejectedEvent.Reason.ShouldBe(TestData.RejectionReason); - } - - [Fact] - public void FileProcessingCompletedEvent_CanBeCreated_IsCreated() - { - FileProcessingCompletedEvent fileProcessingCompletedEvent = - new FileProcessingCompletedEvent(TestData.FileId, TestData.EstateId, TestData.MerchantId, TestData.ProcessingCompletedDateTime); - - fileProcessingCompletedEvent.FileId.ShouldBe(TestData.FileId); - fileProcessingCompletedEvent.EstateId.ShouldBe(TestData.EstateId); - fileProcessingCompletedEvent.ProcessingCompletedDateTime.ShouldBe(TestData.ProcessingCompletedDateTime); - } - } -} diff --git a/FileProcessor.DomainEvents.Tests/FileImportLogAggregateDomainEventTests.cs b/FileProcessor.DomainEvents.Tests/FileImportLogAggregateDomainEventTests.cs deleted file mode 100644 index 7709be0..0000000 --- a/FileProcessor.DomainEvents.Tests/FileImportLogAggregateDomainEventTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace FileProcessor.DomainEvents.Tests -{ - using FileImportLog.DomainEvents; - using Shouldly; - using Testing; - using Xunit; - - public class FileImportLogAggregateDomainEventTests - { - [Fact] - public void ImportLogCreatedEvent_CanBeCreated_IsCreated() - { - ImportLogCreatedEvent importLogCreatedEvent = new ImportLogCreatedEvent(TestData.FileImportLogId, TestData.EstateId, TestData.ImportLogDateTime); - - importLogCreatedEvent.FileImportLogId.ShouldBe(TestData.FileImportLogId); - importLogCreatedEvent.EstateId.ShouldBe(TestData.EstateId); - importLogCreatedEvent.ImportLogDateTime.ShouldBe(TestData.ImportLogDateTime); - } - - [Fact] - public void FileAddedToImportLogEvent_CanBeCreated_IsCreated() - { - FileAddedToImportLogEvent fileAddedToImportLogEvent = new FileAddedToImportLogEvent(TestData.FileImportLogId, TestData.FileId, - TestData.EstateId,TestData.MerchantId, - TestData.UserId, TestData.FileProfileId, - TestData.OriginalFileName, - TestData.FilePath, TestData.FileUploadedDateTime); - - fileAddedToImportLogEvent.FileImportLogId.ShouldBe(TestData.FileImportLogId); - fileAddedToImportLogEvent.FileId.ShouldBe(TestData.FileId); - fileAddedToImportLogEvent.EstateId.ShouldBe(TestData.EstateId); - fileAddedToImportLogEvent.MerchantId.ShouldBe(TestData.MerchantId); - fileAddedToImportLogEvent.UserId.ShouldBe(TestData.UserId); - fileAddedToImportLogEvent.FileProfileId.ShouldBe(TestData.FileProfileId); - fileAddedToImportLogEvent.OriginalFileName.ShouldBe(TestData.OriginalFileName); - fileAddedToImportLogEvent.FilePath.ShouldBe(TestData.FilePath); - fileAddedToImportLogEvent.FileUploadedDateTime.ShouldBe(TestData.FileUploadedDateTime); - } - } -} \ No newline at end of file diff --git a/FileProcessor.DomainEvents.Tests/FileProcessor.DomainEvents.Tests.csproj b/FileProcessor.DomainEvents.Tests/FileProcessor.DomainEvents.Tests.csproj deleted file mode 100644 index 875a303..0000000 --- a/FileProcessor.DomainEvents.Tests/FileProcessor.DomainEvents.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net8.0 - None - false - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - From a34248eefb76b5e9779688a9e3407b2b92103b0a Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 14 Mar 2025 06:51:45 +0000 Subject: [PATCH 3/3] Remove DomainEvents tests and update coverage reports This commit removes the test execution for the `FileProcessor.DomainEvents.Tests` project from both `nightlybuild.yml` and `pullrequest.yml`. The coverage report upload step in `nightlybuild.yml` has been updated to exclude `lcov4.info`, which is associated with the removed test project. Additionally, the Node.js setup has been removed from `nightlybuild.yml`. --- .github/workflows/nightlybuild.yml | 3 +-- .github/workflows/pullrequest.yml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index ffafbea..4d09b01 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -31,7 +31,6 @@ jobs: dotnet test "FileProcessor.BusinessLogic.Tests\FileProcessor.BusinessLogic.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" dotnet test "FileProcessor.FileAggregate.Tests\FileProcessor.FileAggregate.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" dotnet test "FileProcessor.FileImportLogAggregate.Tests\FileProcessor.FileImportLogAggregate.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov3.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - dotnet test "FileProcessor.DomainEvents.Tests\FileProcessor.DomainEvents.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov4.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - name: Setup Node.js for use with actions uses: actions/setup-node@v1.4.4 @@ -40,7 +39,7 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./lcov1.info,./lcov2.info,./lcov3.info,./lcov4.info + files: ./lcov1.info,./lcov2.info,./lcov3.info - name: Build Docker Image run: docker build . --file FileProcessor/Dockerfile --tag fileprocessor:latest diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ae3b6d5..383fb0b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -33,7 +33,6 @@ jobs: dotnet test "FileProcessor.BusinessLogic.Tests\FileProcessor.BusinessLogic.Tests.csproj" dotnet test "FileProcessor.FileAggregate.Tests\FileProcessor.FileAggregate.Tests.csproj" dotnet test "FileProcessor.FileImportLogAggregate.Tests\FileProcessor.FileImportLogAggregate.Tests.csproj" - dotnet test "FileProcessor.DomainEvents.Tests\FileProcessor.DomainEvents.Tests.csproj" - name: Build Docker Image run: docker build . --file FileProcessor/Dockerfile --tag fileprocessor:latest