diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index fe84bde..1359c9d 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -55,13 +55,13 @@ jobs: run: docker build . --file FileProcessor/Dockerfile --tag fileprocessor:latest - name: Run Integration Tests - run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=Nightly + run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" - - name: Run Integration Tests 1 - run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=Nightly1 + #- name: Run Integration Tests 1 + #run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=Nightly1 - - name: Run Integration Tests 2 - run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=Nightly2 + #- name: Run Integration Tests 2 + #run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=Nightly2 - uses: actions/upload-artifact@v4.4.0 if: ${{ failure() }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ae8a78f..343b672 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -45,11 +45,11 @@ jobs: - name: Run Integration Tests run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=PRTest - - name: Run Integration Tests 1 - run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=PRTest1 + #- name: Run Integration Tests 1 + # run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=PRTest1 - - name: Run Integration Tests 2 - run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=PRTest2 + #- name: Run Integration Tests 2 + # run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj" --filter Category=PRTest2 - uses: actions/upload-artifact@v4.4.0 if: ${{ failure() }} diff --git a/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj b/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj index 45b8717..2342578 100644 --- a/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj +++ b/FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj @@ -8,12 +8,12 @@ - - + + - + - + diff --git a/FileProcessor.Client/FileProcessor.Client.csproj b/FileProcessor.Client/FileProcessor.Client.csproj index a5bb5f4..7682a46 100644 --- a/FileProcessor.Client/FileProcessor.Client.csproj +++ b/FileProcessor.Client/FileProcessor.Client.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/FileProcessor.Client/FileProcessorClient.cs b/FileProcessor.Client/FileProcessorClient.cs index 5271416..91d4477 100644 --- a/FileProcessor.Client/FileProcessorClient.cs +++ b/FileProcessor.Client/FileProcessorClient.cs @@ -62,7 +62,7 @@ public async Task> GetFile(String accessToken, String requestUri = this.BuildRequestUrl($"/api/files/{fileId}?estateId={estateId}"); try { - Result result = await this.SendGetRequest (requestUri, accessToken, cancellationToken); + Result result = await this.SendHttpGetRequest (requestUri, accessToken, cancellationToken); if (result.IsFailed) return ResultHelpers.CreateFailure(result); @@ -98,7 +98,7 @@ public async Task> GetFileImportLog(String accessToken, } try { - Result result = await this.SendGetRequest(requestUri, accessToken, cancellationToken); + Result result = await this.SendHttpGetRequest(requestUri, accessToken, cancellationToken); if (result.IsFailed) return ResultHelpers.CreateFailure(result); @@ -138,7 +138,7 @@ public async Task> GetFileImportLogs(String accessToke } try { - Result result = await this.SendGetRequest(requestUri, accessToken, cancellationToken); + Result result = await this.SendHttpGetRequest(requestUri, accessToken, cancellationToken); if (result.IsFailed) return ResultHelpers.CreateFailure(result); diff --git a/FileProcessor.File.DomainEvents/FileProcessor.File.DomainEvents.csproj b/FileProcessor.File.DomainEvents/FileProcessor.File.DomainEvents.csproj index cbf9513..cf94eae 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/FileProcessor.FileAggregate.csproj b/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj index b57ee67..fb3b3c1 100644 --- a/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj +++ b/FileProcessor.FileAggregate/FileProcessor.FileAggregate.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/FileProcessor.FileImportLog.DomainEvents/FileProcessor.FileImportLog.DomainEvents.csproj b/FileProcessor.FileImportLog.DomainEvents/FileProcessor.FileImportLog.DomainEvents.csproj index 6fcf558..aa4d6a7 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/FileProcessor.FileImportLogAggregate.csproj b/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj index 8996cec..3cfd3bd 100644 --- a/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj +++ b/FileProcessor.FileImportLogAggregate/FileProcessor.FileImportLogAggregate.csproj @@ -7,7 +7,7 @@ - + diff --git a/FileProcessor.IntegrationTesting.Helpers/FileProcessor.IntegrationTesting.Helpers.csproj b/FileProcessor.IntegrationTesting.Helpers/FileProcessor.IntegrationTesting.Helpers.csproj index b465619..17920ec 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/Common/DockerHelper.cs b/FileProcessor.IntegrationTests/Common/DockerHelper.cs index c3da911..6253004 100644 --- a/FileProcessor.IntegrationTests/Common/DockerHelper.cs +++ b/FileProcessor.IntegrationTests/Common/DockerHelper.cs @@ -11,7 +11,7 @@ namespace FileProcessor.IntegrationTests.Common using Shared.IntegrationTesting; using TransactionProcessor.Client; - public class DockerHelper : global::Shared.IntegrationTesting.DockerHelper{ + public class DockerHelper : global::Shared.IntegrationTesting.TestContainers.DockerHelper{ #region Fields public HttpClient TestHostHttpClient; @@ -63,15 +63,6 @@ public override async Task CreateSubscriptions(){ } } - //protected override EventStoreClientSettings ConfigureEventStoreSettings() - //{ - // string str = $"esdb://127.0.0.1:{this.EventStoreHttpPort}?tls=false&tlsVerifyCert=false&defaultDeadline=30000"; - // if (this.IsSecureEventStore) { - // str = $"esdb://admin:changeit@127.0.0.1:{this.EventStoreHttpPort}?tls=true&tlsVerifyCert=false&defaultDeadline=30000"; - // } - // return EventStoreClientSettings.Create(str); - //} - public override async Task StartContainersForScenarioRun(String scenarioName, DockerServices dockerServices){ await base.StartContainersForScenarioRun(scenarioName, dockerServices); diff --git a/FileProcessor.IntegrationTests/Common/GenericSteps.cs b/FileProcessor.IntegrationTests/Common/GenericSteps.cs index 9ddb053..80d2d96 100644 --- a/FileProcessor.IntegrationTests/Common/GenericSteps.cs +++ b/FileProcessor.IntegrationTests/Common/GenericSteps.cs @@ -48,8 +48,6 @@ public async Task StartSystem() await Setup.GlobalSetup(this.TestingContext.DockerHelper); - this.TestingContext.DockerHelper.SqlServerContainer = Setup.DatabaseServerContainer; - this.TestingContext.DockerHelper.SqlServerNetwork = Setup.DatabaseServerNetwork; this.TestingContext.DockerHelper.DockerCredentials = Setup.DockerCredentials; this.TestingContext.DockerHelper.SqlCredentials = Setup.SqlCredentials; this.TestingContext.DockerHelper.SqlServerContainerName = "sharedsqlserver"; @@ -64,7 +62,7 @@ public async Task StartSystem() [AfterScenario] public async Task StopSystem(){ - DockerServices shareDockerServices = DockerServices.SqlServer; + DockerServices shareDockerServices = DockerServices.None; this.TestingContext.Logger.LogInformation("About to Stop Containers for Scenario Run"); await this.TestingContext.DockerHelper.StopContainersForScenarioRun(shareDockerServices).ConfigureAwait(false); diff --git a/FileProcessor.IntegrationTests/Common/Setup.cs b/FileProcessor.IntegrationTests/Common/Setup.cs index 634f49d..4f88fe7 100644 --- a/FileProcessor.IntegrationTests/Common/Setup.cs +++ b/FileProcessor.IntegrationTests/Common/Setup.cs @@ -21,44 +21,12 @@ [Binding] public class Setup { - public static IContainerService DatabaseServerContainer; - public static INetworkService DatabaseServerNetwork; public static (String usename, String password) SqlCredentials = ("sa", "thisisalongpassword123!"); public static (String url, String username, String password) DockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland"); - static object padLock = new object(); // Object to lock on - public static async Task GlobalSetup(DockerHelper dockerHelper) { - Environment.SetEnvironmentVariable("FLUENTDOCKER_LOGLEVEL", "trace"); - Environment.SetEnvironmentVariable("FLUENTDOCKER_NOSUDO", "true"); - Environment.SetEnvironmentVariable("FLUENTDOCKER_PATH", "/usr/bin/docker"); - ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(1); - dockerHelper.SqlCredentials = Setup.SqlCredentials; - dockerHelper.DockerCredentials = Setup.DockerCredentials; - dockerHelper.SqlServerContainerName = "sharedsqlserver"; - - lock (Setup.padLock) - { - Setup.DatabaseServerNetwork = dockerHelper.SetupTestNetwork("sharednetwork"); - - dockerHelper.Logger.LogInformation("in start SetupSqlServerContainer"); - Setup.DatabaseServerContainer = dockerHelper.SetupSqlServerContainer(Setup.DatabaseServerNetwork).Result; - } - } - - public static String GetConnectionString(String databaseName) - { - return $"server={Setup.DatabaseServerContainer.Name};database={databaseName};user id={Setup.SqlCredentials.usename};password={Setup.SqlCredentials.password}"; - } - - public static String GetLocalConnectionString(String databaseName) - { - Int32 databaseHostPort = Setup.DatabaseServerContainer.ToHostExposedEndpoint("1433/tcp").Port; - - return $"server=localhost,{databaseHostPort};database={databaseName};user id={Setup.SqlCredentials.usename};password={Setup.SqlCredentials.password}"; } - } } \ No newline at end of file diff --git a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature index 4ad2f96..704ea63 100644 --- a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature +++ b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature @@ -81,7 +81,7 @@ Background: | Deposit1 | 300.00 | Today | Test Merchant 1 | Test Estate 1 | | Deposit1 | 300.00 | Today | Test Merchant 2 | Test Estate 1 | -@PRTest1 +@PRTest @Nightly1 Scenario: Get File Import Log Details Given I have a file named 'SafarcomTopup1.txt' with the following contents diff --git a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs index 8088dcf..86725e6 100644 --- a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs +++ b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs @@ -422,16 +422,18 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Get File Import Log Details")] [global::NUnit.Framework.CategoryAttribute("PRTest")] + [global::NUnit.Framework.CategoryAttribute("Nightly1")] public async global::System.Threading.Tasks.Task GetFileImportLogDetails() { string[] tagsOfScenario = new string[] { - "PRTest"}; + "PRTest", + "Nightly1"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "0"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get File Import Log Details", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 85 +#line 86 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -460,7 +462,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 86 +#line 87 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table16, "Given "); #line hidden global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { @@ -473,7 +475,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 91 +#line 92 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table17, "And "); #line hidden global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { @@ -492,7 +494,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 95 +#line 96 await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table18, "Given "); #line hidden global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { @@ -505,7 +507,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 2", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 100 +#line 101 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table19, "And "); #line hidden global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { @@ -533,7 +535,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 104 +#line 105 await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table20, "Given "); #line hidden global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { @@ -546,7 +548,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 110 +#line 111 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table21, "And "); #line hidden global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { @@ -555,7 +557,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and table22.AddRow(new string[] { "Today", "3"}); -#line 114 +#line 115 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 @@ -571,7 +573,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye table23.AddRow(new string[] { "Test Merchant 1", "VoucherIssue1.txt"}); -#line 118 +#line 119 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 @@ -591,7 +593,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "2", "0", "0"}); -#line 124 +#line 125 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 @@ -611,7 +613,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "3", "T,1,", "Ignored"}); -#line 128 +#line 129 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 @@ -631,7 +633,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "2", "0", "0"}); -#line 134 +#line 135 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 @@ -651,7 +653,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "3", "T,1,", "Ignored"}); -#line 138 +#line 139 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 @@ -671,7 +673,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "2", "0", "0"}); -#line 144 +#line 145 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 @@ -695,7 +697,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "4", "T,1,,", "Ignored"}); -#line 148 +#line 149 await testRunner.WhenAsync("I get the file \'VoucherIssue1.txt\' for Estate \'Test Estate 1\' the following file " + "lines are returned", ((string)(null)), table29, "When "); #line hidden diff --git a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs index 3833280..2ebb9b9 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs +++ b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs @@ -380,15 +380,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Safaricom Topup File with 1 detail row")] + [global::NUnit.Framework.CategoryAttribute("Nightly")] public async global::System.Threading.Tasks.Task ProcessSafaricomTopupFileWith1DetailRow() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "0"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Safaricom Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 77 +#line 78 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -417,7 +419,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 78 +#line 79 await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table45, "Given "); #line hidden global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { @@ -430,7 +432,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 83 +#line 84 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table46, "And "); #line hidden } @@ -439,15 +441,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Safaricom Topup File with 2 detail rows")] + [global::NUnit.Framework.CategoryAttribute("Nightly")] public async global::System.Threading.Tasks.Task ProcessSafaricomTopupFileWith2DetailRows() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "1"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Safaricom Topup File with 2 detail rows", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 89 +#line 91 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -480,7 +484,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "2", ""}); -#line 90 +#line 92 await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table47, "Given "); #line hidden global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { @@ -493,7 +497,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 96 +#line 98 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table48, "And "); #line hidden } @@ -502,15 +506,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process 2 Safaricom Topup Files")] + [global::NUnit.Framework.CategoryAttribute("Nightly")] public async global::System.Threading.Tasks.Task Process2SafaricomTopupFiles() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "2"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process 2 Safaricom Topup Files", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 102 +#line 105 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -539,7 +545,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 103 +#line 106 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table49, "Given "); #line hidden global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { @@ -552,7 +558,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 108 +#line 111 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table50, "And "); #line hidden global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { @@ -575,7 +581,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "2", ""}); -#line 112 +#line 115 await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table51, "Given "); #line hidden global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { @@ -588,7 +594,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 118 +#line 121 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table52, "And "); #line hidden } @@ -598,16 +604,18 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Duplicate Safaricom Topup File with 1 detail row")] [global::NUnit.Framework.CategoryAttribute("PRTest")] + [global::NUnit.Framework.CategoryAttribute("Nightly")] public async global::System.Threading.Tasks.Task ProcessDuplicateSafaricomTopupFileWith1DetailRow() { string[] tagsOfScenario = new string[] { - "PRTest"}; + "PRTest", + "Nightly"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "3"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Duplicate Safaricom Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 125 +#line 129 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -640,7 +648,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 126 +#line 130 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table53, "Given "); #line hidden global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { @@ -653,7 +661,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 132 +#line 136 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table54, "And "); #line hidden global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { @@ -676,7 +684,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 138 +#line 142 await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table55, "Given "); #line hidden global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { @@ -689,7 +697,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 144 +#line 148 await testRunner.AndAsync("I upload this file for processing an error should be returned indicating the file" + " is a duplicate", ((string)(null)), table56, "And "); #line hidden @@ -699,15 +707,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Safaricom Topup File with Upload Date Time")] + [global::NUnit.Framework.CategoryAttribute("Nightly")] public async global::System.Threading.Tasks.Task ProcessSafaricomTopupFileWithUploadDateTime() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "4"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Safaricom Topup File with Upload Date Time", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 150 +#line 154 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -736,7 +746,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 151 +#line 155 await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table57, "Given "); #line hidden global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { @@ -751,10 +761,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "Today"}); -#line 156 +#line 160 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table58, "And "); #line hidden -#line 160 +#line 164 await testRunner.WhenAsync("I get the import log for estate \'Test Estate 1\' the date on the import log is \'To" + "day\'", ((string)(null)), ((global::Reqnroll.Table)(null)), "When "); #line hidden @@ -774,7 +784,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "T", "1", ""}); -#line 162 +#line 166 await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table59, "Given "); #line hidden global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { @@ -789,10 +799,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "01/09/2021"}); -#line 167 +#line 171 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table60, "And "); #line hidden -#line 171 +#line 175 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)), ((global::Reqnroll.Table)(null)), "When "); #line hidden diff --git a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature index ca835da..43cc047 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature +++ b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature @@ -139,7 +139,7 @@ Scenario: Process 2 Voucher Files #When As merchant "Test Merchant 1" on Estate "Test Estate 1" I get my transactions 4 transaction should be returned -@PRTest2 +@PRTest @Nightly2 Scenario: Process Duplicate Voucher Topup File with 1 detail row Given I have a file named 'VoucherIssue1.txt' with the following contents diff --git a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs index b3487ba..f36b26e 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs +++ b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs @@ -390,15 +390,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Voucher File with 1 detail row for recipient email")] + [global::NUnit.Framework.CategoryAttribute("Nightly2")] public async global::System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForRecipientEmail() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly2"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "0"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Voucher File with 1 detail row for recipient email", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 78 +#line 79 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -431,7 +433,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 79 +#line 80 await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table76, "Given "); #line hidden global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { @@ -444,7 +446,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 84 +#line 85 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table77, "And "); #line hidden } @@ -453,15 +455,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Voucher File with 1 detail row for recipient mobile")] + [global::NUnit.Framework.CategoryAttribute("Nightly2")] public async global::System.Threading.Tasks.Task ProcessVoucherFileWith1DetailRowForRecipientMobile() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly2"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "1"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Voucher File with 1 detail row for recipient mobile", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 90 +#line 92 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -494,7 +498,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 91 +#line 93 await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table78, "Given "); #line hidden global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { @@ -507,7 +511,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 96 +#line 98 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table79, "And "); #line hidden } @@ -516,15 +520,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Voucher File with 2 detail rows")] + [global::NUnit.Framework.CategoryAttribute("Nightly2")] public async global::System.Threading.Tasks.Task ProcessVoucherFileWith2DetailRows() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly2"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "2"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Voucher File with 2 detail rows", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 102 +#line 105 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -562,7 +568,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 103 +#line 106 await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table80, "Given "); #line hidden global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { @@ -575,7 +581,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 109 +#line 112 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table81, "And "); #line hidden } @@ -584,15 +590,17 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process 2 Voucher Files")] + [global::NUnit.Framework.CategoryAttribute("Nightly2")] public async global::System.Threading.Tasks.Task Process2VoucherFiles() { - string[] tagsOfScenario = ((string[])(null)); + string[] tagsOfScenario = new string[] { + "Nightly2"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "3"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process 2 Voucher Files", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 115 +#line 119 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -630,7 +638,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 116 +#line 120 await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table82, "Given "); #line hidden global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { @@ -643,7 +651,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 122 +#line 126 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table83, "And "); #line hidden global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { @@ -671,7 +679,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 126 +#line 130 await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table84, "Given "); #line hidden global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { @@ -684,7 +692,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 132 +#line 136 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table85, "And "); #line hidden } @@ -694,16 +702,18 @@ await testRunner.GivenAsync("I have a token to access the estate management and [global::NUnit.Framework.TestAttribute()] [global::NUnit.Framework.DescriptionAttribute("Process Duplicate Voucher Topup File with 1 detail row")] [global::NUnit.Framework.CategoryAttribute("PRTest")] + [global::NUnit.Framework.CategoryAttribute("Nightly2")] public async global::System.Threading.Tasks.Task ProcessDuplicateVoucherTopupFileWith1DetailRow() { string[] tagsOfScenario = new string[] { - "PRTest"}; + "PRTest", + "Nightly2"}; global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); string pickleIndex = "4"; global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Process Duplicate Voucher Topup File with 1 detail row", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); string[] tagsOfRule = ((string[])(null)); global::Reqnroll.RuleInfo ruleInfo = null; -#line 139 +#line 144 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -741,7 +751,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 140 +#line 145 await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table86, "Given "); #line hidden global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { @@ -754,7 +764,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 146 +#line 151 await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table87, "And "); #line hidden global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { @@ -782,7 +792,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "1", "", ""}); -#line 152 +#line 157 await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table88, "Given "); #line hidden global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { @@ -795,7 +805,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 159 +#line 164 await testRunner.AndAsync("I upload this file for processing an error should be returned indicating the file" + " is a duplicate", ((string)(null)), table89, "And "); #line hidden diff --git a/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj b/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj index b368cc9..b39ef49 100644 --- a/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj +++ b/FileProcessor.IntegrationTests/FileProcessor.IntegrationTests.csproj @@ -24,11 +24,11 @@ - - + + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/FileProcessor/FileProcessor.csproj b/FileProcessor/FileProcessor.csproj index bf5a1b8..ebb774b 100644 --- a/FileProcessor/FileProcessor.csproj +++ b/FileProcessor/FileProcessor.csproj @@ -6,7 +6,7 @@ - + @@ -19,12 +19,12 @@ - + - +