From a90fc500f6e36cfc1c3d77b3bda9dae8af3bc743 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Sat, 11 Jul 2026 21:50:38 +0100 Subject: [PATCH 1/2] Remove file profile seeding from startup --- .../DummyFileProcessorDomainService.cs | 4 - .../Managers/FileProcessorManager.cs | 5 -- .../Managers/FileProfileManager.cs | 74 ++----------------- .../Managers/IFileProcessorManager.cs | 2 - .../Managers/IFileProfileManager.cs | 2 - FileProcessor/Bootstrapper/FileRegistry.cs | 24 ------ FileProcessor/Common/Extensions.cs | 6 -- FileProcessor/appsettings.json | 22 +----- 8 files changed, 9 insertions(+), 130 deletions(-) diff --git a/FileProcessor.BusinessLogic.Tests/DummyFileProcessorDomainService.cs b/FileProcessor.BusinessLogic.Tests/DummyFileProcessorDomainService.cs index aded260..6be3735 100644 --- a/FileProcessor.BusinessLogic.Tests/DummyFileProcessorDomainService.cs +++ b/FileProcessor.BusinessLogic.Tests/DummyFileProcessorDomainService.cs @@ -27,10 +27,6 @@ public async Task ProcessTransactionForFileLine(FileCommands.ProcessTran } public class DummyFileProcessorManager : IFileProcessorManager { - public async Task EnsureSeededFileProfiles(CancellationToken cancellationToken) { - return Result.Success(); - } - public async Task>> GetAllFileProfiles(CancellationToken cancellationToken) { return Result.Success(); } diff --git a/FileProcessor.BusinessLogic/Managers/FileProcessorManager.cs b/FileProcessor.BusinessLogic/Managers/FileProcessorManager.cs index 901d5b2..b33db6d 100644 --- a/FileProcessor.BusinessLogic/Managers/FileProcessorManager.cs +++ b/FileProcessor.BusinessLogic/Managers/FileProcessorManager.cs @@ -76,11 +76,6 @@ public async Task> GetFileProfile(Guid fileProfileId, return await this.FileProfileManager.GetFileProfile(fileProfileId, cancellationToken); } - public async Task EnsureSeededFileProfiles(CancellationToken cancellationToken) - { - return await this.FileProfileManager.EnsureSeededFileProfiles(cancellationToken); - } - private async Task GetContext(Guid estateId) { ResolvedDbContext? resolvedContext = this.Resolver.Resolve(EstateManagementDatabaseName, estateId.ToString()); diff --git a/FileProcessor.BusinessLogic/Managers/FileProfileManager.cs b/FileProcessor.BusinessLogic/Managers/FileProfileManager.cs index 89bc246..9ffc7cf 100644 --- a/FileProcessor.BusinessLogic/Managers/FileProfileManager.cs +++ b/FileProcessor.BusinessLogic/Managers/FileProfileManager.cs @@ -17,31 +17,16 @@ namespace FileProcessor.BusinessLogic.Managers; public class FileProfileManager : IFileProfileManager { - private readonly List SeedProfiles; - private readonly IAggregateRepository FileProfileAggregateRepository; - public FileProfileManager(List seedProfiles, - IAggregateRepository fileProfileAggregateRepository) + public FileProfileManager(IAggregateRepository fileProfileAggregateRepository) { - this.SeedProfiles = seedProfiles; this.FileProfileAggregateRepository = fileProfileAggregateRepository; } - public async Task EnsureSeededFileProfiles(CancellationToken cancellationToken) - { - Result aggregateResult = await this.LoadAggregate(cancellationToken, true); - if (aggregateResult.IsFailed) - { - return ResultHelpers.CreateFailure(aggregateResult); - } - - return Result.Success(); - } - public async Task>> GetAllFileProfiles(CancellationToken cancellationToken) { - Result aggregateResult = await this.LoadAggregate(cancellationToken, false); + Result aggregateResult = await this.LoadAggregate(cancellationToken); if (aggregateResult.IsFailed) { return ResultHelpers.CreateFailure(aggregateResult); @@ -52,7 +37,7 @@ public async Task>> GetAllFileProfiles(Cancellatio public async Task> GetFileProfile(Guid fileProfileId, CancellationToken cancellationToken) { - Result aggregateResult = await this.LoadAggregate(cancellationToken, false); + Result aggregateResult = await this.LoadAggregate(cancellationToken); if (aggregateResult.IsFailed) { return ResultHelpers.CreateFailure(aggregateResult); @@ -69,7 +54,7 @@ public async Task> GetFileProfile(Guid fileProfileId, C public async Task> CreateFileProfile(CreateFileProfileRequest request, CancellationToken cancellationToken) { - Result aggregateResult = await this.LoadAggregate(cancellationToken, true); + Result aggregateResult = await this.LoadAggregate(cancellationToken); if (aggregateResult.IsFailed) { return ResultHelpers.CreateFailure(aggregateResult); @@ -93,7 +78,7 @@ public async Task> CreateFileProfile(CreateFileProfileR public async Task> UpdateFileProfile(Guid fileProfileId, UpdateFileProfileRequest request, CancellationToken cancellationToken) { - Result aggregateResult = await this.LoadAggregate(cancellationToken, true); + Result aggregateResult = await this.LoadAggregate(cancellationToken); if (aggregateResult.IsFailed) { return ResultHelpers.CreateFailure(aggregateResult); @@ -117,7 +102,7 @@ public async Task> UpdateFileProfile(Guid fileProfileId public async Task ArchiveFileProfile(Guid fileProfileId, CancellationToken cancellationToken) { - Result aggregateResult = await this.LoadAggregate(cancellationToken, true); + Result aggregateResult = await this.LoadAggregate(cancellationToken); if (aggregateResult.IsFailed) { return ResultHelpers.CreateFailure(aggregateResult); @@ -132,7 +117,7 @@ public async Task ArchiveFileProfile(Guid fileProfileId, CancellationTok return await this.FileProfileAggregateRepository.SaveChanges(aggregateResult.Data, cancellationToken); } - private async Task> LoadAggregate(CancellationToken cancellationToken, bool seedIfMissing) + private async Task> LoadAggregate(CancellationToken cancellationToken) { Result aggregateResult = await this.FileProfileAggregateRepository.GetLatestVersion(FileProfileAggregateRoot.FileProfileCollectionId, cancellationToken); if (aggregateResult.IsSuccess) @@ -145,49 +130,6 @@ private async Task> LoadAggregate(CancellationT return ResultHelpers.CreateFailure(aggregateResult); } - FileProfileAggregateRoot aggregate = FileProfileAggregateRoot.Create(); - if (seedIfMissing && this.SeedProfiles.Any()) - { - Result seeded = this.SeedAggregate(aggregate); - if (seeded.IsFailed) - { - return seeded; - } - - Result saveResult = await this.FileProfileAggregateRepository.SaveChanges(seeded.Data, cancellationToken); - if (saveResult.IsFailed) - { - return ResultHelpers.CreateFailure(saveResult); - } - - return Result.Success(seeded.Data); - } - - return Result.Success(aggregate); - } - - private Result SeedAggregate(FileProfileAggregateRoot aggregate) - { - foreach (FileProfileModel fileProfile in this.SeedProfiles) - { - CreateFileProfileRequest request = new CreateFileProfileRequest - { - FileProfileId = fileProfile.FileProfileId, - Name = fileProfile.Name, - ListeningDirectory = fileProfile.ListeningDirectory, - RequestType = fileProfile.RequestType, - OperatorName = fileProfile.OperatorName, - LineTerminator = fileProfile.LineTerminator, - FileFormatHandler = fileProfile.FileFormatHandler - }; - - Result createResult = aggregate.CreateProfile(request); - if (createResult.IsFailed) - { - return ResultHelpers.CreateFailure(createResult); - } - } - - return Result.Success(aggregate); + return Result.Success(FileProfileAggregateRoot.Create()); } } diff --git a/FileProcessor.BusinessLogic/Managers/IFileProcessorManager.cs b/FileProcessor.BusinessLogic/Managers/IFileProcessorManager.cs index 4a6b3c6..dad8041 100644 --- a/FileProcessor.BusinessLogic/Managers/IFileProcessorManager.cs +++ b/FileProcessor.BusinessLogic/Managers/IFileProcessorManager.cs @@ -20,8 +20,6 @@ public interface IFileProcessorManager Task> GetFileProfile(Guid fileProfileId, CancellationToken cancellationToken); - Task EnsureSeededFileProfiles(CancellationToken cancellationToken); - Task>> GetFileImportLogs(Guid estateId, DateTime startDateTime, DateTime endDateTime, Guid? merchantId, CancellationToken cancellationToken); Task> GetFileImportLog(Guid fileImportLogId, Guid estateId, Guid? merchantId, CancellationToken cancellationToken); diff --git a/FileProcessor.BusinessLogic/Managers/IFileProfileManager.cs b/FileProcessor.BusinessLogic/Managers/IFileProfileManager.cs index b817411..a5ff4ce 100644 --- a/FileProcessor.BusinessLogic/Managers/IFileProfileManager.cs +++ b/FileProcessor.BusinessLogic/Managers/IFileProfileManager.cs @@ -10,8 +10,6 @@ namespace FileProcessor.BusinessLogic.Managers; public interface IFileProfileManager { - Task EnsureSeededFileProfiles(CancellationToken cancellationToken); - Task>> GetAllFileProfiles(CancellationToken cancellationToken); Task> GetFileProfile(Guid fileProfileId, CancellationToken cancellationToken); diff --git a/FileProcessor/Bootstrapper/FileRegistry.cs b/FileProcessor/Bootstrapper/FileRegistry.cs index ce9c1e1..f2a42ec 100644 --- a/FileProcessor/Bootstrapper/FileRegistry.cs +++ b/FileProcessor/Bootstrapper/FileRegistry.cs @@ -1,15 +1,11 @@ namespace FileProcessor.Bootstrapper; using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO.Abstractions; -using System.Linq; using BusinessLogic.FileFormatHandlers; using Lamar; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using FileProfileModel = global::FileProcessor.Models.FileProfile; [ExcludeFromCodeCoverage] public class FileRegistry : ServiceRegistry @@ -21,26 +17,6 @@ public class FileRegistry : ServiceRegistry /// public FileRegistry() { - IEnumerable fileProfiles = Startup.Configuration.GetSection("AppSettings:FileProfiles").GetChildren().ToList().Select(x => new - { - Name = x.GetValue("Name"), - FileProfileId = x.GetValue("Id"), - RequestType = x.GetValue("RequestType"), - ListeningDirectory = x.GetValue("ListeningDirectory"), - OperatorName = x.GetValue("OperatorName"), - LineTerminator = x.GetValue("LineTerminator"), - FileFormatHandler = x.GetValue("FileFormatHandler") - }).Select(f => - { - return new FileProfileModel(f.FileProfileId, - f.Name, - f.ListeningDirectory, - f.RequestType, - f.OperatorName, - f.LineTerminator, - f.FileFormatHandler); - }); - this.AddSingleton(fileProfiles.ToList()); this.AddSingleton(); this.AddSingleton>(container => fileFormatHandlerName => { diff --git a/FileProcessor/Common/Extensions.cs b/FileProcessor/Common/Extensions.cs index 8d125a0..08f14f1 100644 --- a/FileProcessor/Common/Extensions.cs +++ b/FileProcessor/Common/Extensions.cs @@ -74,12 +74,6 @@ public static void PreWarm(this IApplicationBuilder applicationBuilder){ fileSystem.Directory.CreateDirectory(temporaryFileLocation); Logger.LogInformation($"Created TemporaryFileLocation at [{temporaryFileLocation}]"); - Result seedResult = fileProcessorManager.EnsureSeededFileProfiles(CancellationToken.None).Result; - if (seedResult.IsFailed) { - Logger.LogWarning($"Error seeding file profiles {seedResult.Message}"); - throw new ApplicationStartupException(seedResult.Message); - } - Result> fileProfilesResult = fileProcessorManager.GetAllFileProfiles(CancellationToken.None).Result; if (fileProfilesResult.IsFailed) { diff --git a/FileProcessor/appsettings.json b/FileProcessor/appsettings.json index 36ce9ad..05ef2a1 100644 --- a/FileProcessor/appsettings.json +++ b/FileProcessor/appsettings.json @@ -28,26 +28,6 @@ "FileLineAddedEvent" ] }, - "TemporaryFileLocation": "/home/txnproc/bulkfiles/temporary", - "FileProfiles": [ - { - "Id": "B2A59ABF-293D-4A6B-B81B-7007503C3476", - "Name": "Safaricom Topup", - "ListeningDirectory": "/home/txnproc/bulkfiles/safaricom", - "RequestType": "SafaricomTopupRequest", - "OperatorName": "Safaricom", - "LineTerminator": "\n", - "FileFormatHandler": "SafaricomFileFormatHandler" - }, - { - "Id": "8806EDBC-3ED6-406B-9E5F-A9078356BE99", - "Name": "Voucher Issue", - "ListeningDirectory": "/home/txnproc/bulkfiles/voucher", - "RequestType": "VoucherRequest", - "OperatorName": "Voucher", - "LineTerminator": "\n", - "FileFormatHandler": "VoucherFileFormatHandler" - } - ] + "TemporaryFileLocation": "/home/txnproc/bulkfiles/temporary" } } From 4cc01912ac2fe2d8a4286a84f3a03edc227baa12 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Sun, 12 Jul 2026 14:34:32 +0100 Subject: [PATCH 2/2] Refactor transaction processing flow --- .../Features/FileProfile.feature | 12 +- .../Features/FileProfile.feature.cs | 6 + .../Features/FileProfileSteps.cs | 20 +- .../Features/GetFileImportDetails.feature | 7 +- .../Features/GetFileImportDetails.feature.cs | 286 ++++++++------- .../Features/ProcessTopupCSV.feature | 7 +- .../Features/ProcessTopupCSV.feature.cs | 340 ++++++++++-------- .../Features/ProcessVoucherCSV.feature | 7 +- .../Features/ProcessVoucherCSV.feature.cs | 320 +++++++++-------- 9 files changed, 560 insertions(+), 445 deletions(-) diff --git a/FileProcessor.IntegrationTests/Features/FileProfile.feature b/FileProcessor.IntegrationTests/Features/FileProfile.feature index ab717b0..1a2295a 100644 --- a/FileProcessor.IntegrationTests/Features/FileProfile.feature +++ b/FileProcessor.IntegrationTests/Features/FileProfile.feature @@ -20,9 +20,9 @@ Background: Scenario: Create, update and list file profiles When I create the following file profiles - | Alias | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | - | Profile A | Profile A | /home/txnproc/bulkfiles/profile-a | ProfileARequest | Operator A | \n | ProfileAHandler | - | Profile B | Profile B | /home/txnproc/bulkfiles/profile-b | ProfileBRequest | Operator B | \r\n | ProfileBHandler | + | Alias | FileProfileId | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | + | Profile A | 11111111-1111-1111-1111-111111111111 | Profile A | /home/txnproc/bulkfiles/profile-a | ProfileARequest | Operator A | \n | ProfileAHandler | + | Profile B | 22222222-2222-2222-2222-222222222222 | Profile B | /home/txnproc/bulkfiles/profile-b | ProfileBRequest | Operator B | \r\n | ProfileBHandler | And I update the following file profiles | Alias | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | | Profile A | Profile A Updated | /home/txnproc/bulkfiles/profile-a-updated | ProfileARequestUpdated | Operator A Updated | \r\n | ProfileAHandlerUpdated | @@ -34,9 +34,9 @@ Scenario: Create, update and list file profiles Scenario: Reject duplicate file profile name and request type When I create the following file profiles - | Alias | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | - | Profile A | Profile A | /home/txnproc/bulkfiles/profile-a | ProfileARequest | Operator A | \n | ProfileAHandler | - | Profile B | Profile B | /home/txnproc/bulkfiles/profile-b | ProfileBRequest | Operator B | \r\n | ProfileBHandler | + | Alias | FileProfileId | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | + | Profile A | 33333333-3333-3333-3333-333333333333 | Profile A | /home/txnproc/bulkfiles/profile-a | ProfileARequest | Operator A | \n | ProfileAHandler | + | Profile B | 44444444-4444-4444-4444-444444444444 | Profile B | /home/txnproc/bulkfiles/profile-b | ProfileBRequest | Operator B | \r\n | ProfileBHandler | And I try to create the following duplicate file profiles | DuplicateType | BasedOn | | Name | Profile A | diff --git a/FileProcessor.IntegrationTests/Features/FileProfile.feature.cs b/FileProcessor.IntegrationTests/Features/FileProfile.feature.cs index 9264caa..8aed0d7 100644 --- a/FileProcessor.IntegrationTests/Features/FileProfile.feature.cs +++ b/FileProcessor.IntegrationTests/Features/FileProfile.feature.cs @@ -194,6 +194,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line hidden global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] { "Alias", + "FileProfileId", "Name", "ListeningDirectory", "RequestType", @@ -202,6 +203,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "FileFormatHandler"}); table5.AddRow(new string[] { "Profile A", + "11111111-1111-1111-1111-111111111111", "Profile A", "/home/txnproc/bulkfiles/profile-a", "ProfileARequest", @@ -210,6 +212,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ProfileAHandler"}); table5.AddRow(new string[] { "Profile B", + "22222222-2222-2222-2222-222222222222", "Profile B", "/home/txnproc/bulkfiles/profile-b", "ProfileBRequest", @@ -297,6 +300,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line hidden global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] { "Alias", + "FileProfileId", "Name", "ListeningDirectory", "RequestType", @@ -305,6 +309,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "FileFormatHandler"}); table8.AddRow(new string[] { "Profile A", + "33333333-3333-3333-3333-333333333333", "Profile A", "/home/txnproc/bulkfiles/profile-a", "ProfileARequest", @@ -313,6 +318,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ProfileAHandler"}); table8.AddRow(new string[] { "Profile B", + "44444444-4444-4444-4444-444444444444", "Profile B", "/home/txnproc/bulkfiles/profile-b", "ProfileBRequest", diff --git a/FileProcessor.IntegrationTests/Features/FileProfileSteps.cs b/FileProcessor.IntegrationTests/Features/FileProfileSteps.cs index 5e1893b..61d984c 100644 --- a/FileProcessor.IntegrationTests/Features/FileProfileSteps.cs +++ b/FileProcessor.IntegrationTests/Features/FileProfileSteps.cs @@ -33,13 +33,7 @@ public async Task WhenICreateTheFollowingFileProfiles(DataTable table) foreach (DataTableRow row in table.Rows) { string alias = row["Alias"]; - CreateFileProfileRequest request = this.BuildCreateRequest(row); - Result createResult = await this.FileProcessorSteps.CreateFileProfile(this.TestingContext.AccessToken, request, CancellationToken.None); - - createResult.IsSuccess.ShouldBeTrue(createResult.Message); - createResult.Data.ShouldNotBeNull(); - - this.FileProfileIds[alias] = createResult.Data.FileProfileId; + await this.CreateProfile(alias, this.BuildCreateRequest(row)); } } @@ -126,7 +120,7 @@ private CreateFileProfileRequest BuildCreateRequest(DataTableRow row) { return new CreateFileProfileRequest { - FileProfileId = Guid.NewGuid(), + FileProfileId = Guid.Parse(row["FileProfileId"]), Name = row["Name"], ListeningDirectory = row["ListeningDirectory"], RequestType = row["RequestType"], @@ -136,6 +130,16 @@ private CreateFileProfileRequest BuildCreateRequest(DataTableRow row) }; } + private async Task CreateProfile(string alias, CreateFileProfileRequest request) + { + Result createResult = await this.FileProcessorSteps.CreateFileProfile(this.TestingContext.AccessToken, request, CancellationToken.None); + + createResult.IsSuccess.ShouldBeTrue(createResult.Message); + createResult.Data.ShouldNotBeNull(); + + this.FileProfileIds[alias] = createResult.Data.FileProfileId; + } + private UpdateFileProfileRequest BuildUpdateRequest(DataTableRow row) { return new UpdateFileProfileRequest diff --git a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature index b8b69d6..eb9b3dd 100644 --- a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature +++ b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature @@ -20,6 +20,11 @@ Background: | ClientId | | serviceClient | + When I create the following file profiles + | Alias | FileProfileId | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | + | Safaricom Topup | B2A59ABF-293D-4A6B-B81B-7007503C3476 | Safaricom Topup | /home/txnproc/bulkfiles/safaricom | SafaricomTopupRequest | Safaricom | \n | SafaricomFileFormatHandler | + | Voucher Issue | 8806EDBC-3ED6-406B-9E5F-A9078356BE99 | Voucher Issue | /home/txnproc/bulkfiles/voucher | VoucherRequest | Voucher | \n | VoucherFileFormatHandler | + Given I have created the following estates | EstateName | | Test Estate 1 | @@ -152,4 +157,4 @@ Scenario: Get File Import Log Details - \ No newline at end of file + diff --git a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs index b6e2bc6..7f34e7b 100644 --- a/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs +++ b/FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs @@ -173,58 +173,88 @@ await testRunner.GivenAsync("I have a token to access the estate management and "s", ((string)(null)), table13, "Given "); #line hidden global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] { - "EstateName"}); + "Alias", + "FileProfileId", + "Name", + "ListeningDirectory", + "RequestType", + "OperatorName", + "LineTerminator", + "FileFormatHandler"}); table14.AddRow(new string[] { - "Test Estate 1"}); + "Safaricom Topup", + "B2A59ABF-293D-4A6B-B81B-7007503C3476", + "Safaricom Topup", + "/home/txnproc/bulkfiles/safaricom", + "SafaricomTopupRequest", + "Safaricom", + "\n", + "SafaricomFileFormatHandler"}); + table14.AddRow(new string[] { + "Voucher Issue", + "8806EDBC-3ED6-406B-9E5F-A9078356BE99", + "Voucher Issue", + "/home/txnproc/bulkfiles/voucher", + "VoucherRequest", + "Voucher", + "\n", + "VoucherFileFormatHandler"}); #line 23 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table14, "Given "); + await testRunner.WhenAsync("I create the following file profiles", ((string)(null)), table14, "When "); #line hidden global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] { + "EstateName"}); + table15.AddRow(new string[] { + "Test Estate 1"}); +#line 28 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table15, "Given "); +#line hidden + global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table15.AddRow(new string[] { + table16.AddRow(new string[] { "Test Estate 1", "Safaricom", "True", "True"}); - table15.AddRow(new string[] { + table16.AddRow(new string[] { "Test Estate 1", "Voucher", "True", "True"}); -#line 27 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table15, "Given "); +#line 32 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table16, "Given "); #line hidden - global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table16.AddRow(new string[] { + table17.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table16.AddRow(new string[] { + table17.AddRow(new string[] { "Test Estate 1", "Voucher"}); -#line 32 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table16, "And "); +#line 37 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table17, "And "); #line hidden - global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table17.AddRow(new string[] { + table18.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table17.AddRow(new string[] { + table18.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); -#line 37 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table17, "Given "); +#line 42 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table18, "Given "); #line hidden - global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -232,7 +262,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table18.AddRow(new string[] { + table19.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -240,7 +270,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table18.AddRow(new string[] { + table19.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -248,10 +278,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); -#line 42 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table18, "When "); +#line 47 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table19, "When "); #line hidden - global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -259,7 +289,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CalculationType", "FeeDescription", "Value"}); - table19.AddRow(new string[] { + table20.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -267,10 +297,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Fixed", "Merchant Commission", "2.50"}); -#line 47 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table19, "When "); +#line 52 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table20, "When "); #line hidden - global::Reqnroll.Table table20 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -280,7 +310,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table20.AddRow(new string[] { + table21.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -290,7 +320,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); - table20.AddRow(new string[] { + table21.AddRow(new string[] { "Test Merchant 2", "Address Line 1", "TestTown", @@ -300,100 +330,100 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant2.co.uk", "Test Estate 1"}); -#line 51 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table20, "Given "); +#line 56 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table21, "Given "); #line hidden - global::Reqnroll.Table table21 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table21.AddRow(new string[] { + table22.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table21.AddRow(new string[] { + table22.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table21.AddRow(new string[] { + table22.AddRow(new string[] { "Safaricom", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); - table21.AddRow(new string[] { + table22.AddRow(new string[] { "Voucher", "Test Merchant 2", "00000002", "10000002", "Test Estate 1"}); -#line 56 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table21, "Given "); +#line 61 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table22, "Given "); #line hidden - global::Reqnroll.Table table22 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table22.AddRow(new string[] { + table23.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); - table22.AddRow(new string[] { + table23.AddRow(new string[] { "123456781", "Test Merchant 2", "Test Estate 1"}); -#line 63 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table22, "Given "); +#line 68 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table23, "Given "); #line hidden - global::Reqnroll.Table table23 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table23.AddRow(new string[] { + table24.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table23.AddRow(new string[] { + table24.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); - table23.AddRow(new string[] { + table24.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Safaricom Contract"}); - table23.AddRow(new string[] { + table24.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "Hospital 1 Contract"}); -#line 68 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table23, "When "); +#line 73 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table24, "When "); #line hidden - global::Reqnroll.Table table24 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table24.AddRow(new string[] { + table25.AddRow(new string[] { "Deposit1", "300.00", "Today", "Test Merchant 1", "Test Estate 1"}); - table24.AddRow(new string[] { + table25.AddRow(new string[] { "Deposit1", "300.00", "Today", "Test Merchant 2", "Test Estate 1"}); -#line 75 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table24, "Given "); +#line 80 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table25, "Given "); #line hidden } @@ -416,7 +446,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 82 +#line 87 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -429,144 +459,144 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table25 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table25.AddRow(new string[] { + table26.AddRow(new string[] { "H", "20210508", ""}); - table25.AddRow(new string[] { + table26.AddRow(new string[] { "D", "07777777775", "100"}); - table25.AddRow(new string[] { + table26.AddRow(new string[] { "T", "1", ""}); -#line 83 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table25, "Given "); +#line 88 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table26, "Given "); #line hidden - global::Reqnroll.Table table26 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId", "UploadDateTime"}); - table26.AddRow(new string[] { + table27.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "Today"}); -#line 88 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table26, "And "); +#line 93 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table27, "And "); #line hidden - global::Reqnroll.Table table27 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table27.AddRow(new string[] { + table28.AddRow(new string[] { "H", "20210508", ""}); - table27.AddRow(new string[] { + table28.AddRow(new string[] { "D", "07777777776", "150"}); - table27.AddRow(new string[] { + table28.AddRow(new string[] { "T", "1", ""}); -#line 92 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table27, "Given "); +#line 97 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table28, "Given "); #line hidden - global::Reqnroll.Table table28 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId", "UploadDateTime"}); - table28.AddRow(new string[] { + table29.AddRow(new string[] { "Test Estate 1", "Test Merchant 2", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "Today"}); -#line 97 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table28, "And "); +#line 102 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table29, "And "); #line hidden - global::Reqnroll.Table table29 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table29.AddRow(new string[] { + table30.AddRow(new string[] { "H", "20210508", "", ""}); - table29.AddRow(new string[] { + table30.AddRow(new string[] { "D", "Hospital 1", "07777777775", "10"}); - table29.AddRow(new string[] { + table30.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "10"}); - table29.AddRow(new string[] { + table30.AddRow(new string[] { "T", "1", "", ""}); -#line 101 - await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table29, "Given "); +#line 106 + await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table30, "Given "); #line hidden - global::Reqnroll.Table table30 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId", "UploadDateTime"}); - table30.AddRow(new string[] { + table31.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "Today"}); -#line 107 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table30, "And "); +#line 112 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table31, "And "); #line hidden - global::Reqnroll.Table table31 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { "ImportLogDate", "FileCount"}); - table31.AddRow(new string[] { + table32.AddRow(new string[] { "Today", "3"}); -#line 111 +#line 116 await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Yesterday\' and \'Today\' the followi" + - "ng data is returned", ((string)(null)), table31, "When "); + "ng data is returned", ((string)(null)), table32, "When "); #line hidden - global::Reqnroll.Table table32 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { "MerchantName", "OriginalFileName"}); - table32.AddRow(new string[] { + table33.AddRow(new string[] { "Test Merchant 1", "SafarcomTopup1.txt"}); - table32.AddRow(new string[] { + table33.AddRow(new string[] { "Test Merchant 2", "SafarcomTopup2.txt"}); - table32.AddRow(new string[] { + table33.AddRow(new string[] { "Test Merchant 1", "VoucherIssue1.txt"}); -#line 115 +#line 120 await testRunner.WhenAsync("I get the \'Test Estate 1\' import log for \'Today\' the following file information i" + - "s returned", ((string)(null)), table32, "When "); + "s returned", ((string)(null)), table33, "When "); #line hidden - global::Reqnroll.Table table33 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table34 = new global::Reqnroll.Table(new string[] { "ProcessingCompleted", "NumberOfLines", "TotaLines", @@ -574,7 +604,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "IgnoredLines", "FailedLines", "NotProcessedLines"}); - table33.AddRow(new string[] { + table34.AddRow(new string[] { "True", "3", "3", @@ -582,31 +612,31 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "2", "0", "0"}); -#line 121 +#line 126 await testRunner.WhenAsync("I get the file \'SafarcomTopup1.txt\' for Estate \'Test Estate 1\' the following file" + - " information is returned", ((string)(null)), table33, "When "); + " information is returned", ((string)(null)), table34, "When "); #line hidden - global::Reqnroll.Table table34 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { "LineNumber", "Data", "Result"}); - table34.AddRow(new string[] { + table35.AddRow(new string[] { "1", "H,20210508,", "Ignored"}); - table34.AddRow(new string[] { + table35.AddRow(new string[] { "2", "D,07777777775,100", "Successful"}); - table34.AddRow(new string[] { + table35.AddRow(new string[] { "3", "T,1,", "Ignored"}); -#line 125 +#line 130 await testRunner.WhenAsync("I get the file \'SafarcomTopup1.txt\' for Estate \'Test Estate 1\' the following file" + - " lines are returned", ((string)(null)), table34, "When "); + " lines are returned", ((string)(null)), table35, "When "); #line hidden - global::Reqnroll.Table table35 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { "ProcessingCompleted", "NumberOfLines", "TotaLines", @@ -614,7 +644,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "IgnoredLines", "FailedLines", "NotProcessedLines"}); - table35.AddRow(new string[] { + table36.AddRow(new string[] { "True", "3", "3", @@ -622,31 +652,31 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "2", "0", "0"}); -#line 131 +#line 136 await testRunner.WhenAsync("I get the file \'SafarcomTopup2.txt\' for Estate \'Test Estate 1\' the following file" + - " information is returned", ((string)(null)), table35, "When "); + " information is returned", ((string)(null)), table36, "When "); #line hidden - global::Reqnroll.Table table36 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { "LineNumber", "Data", "Result"}); - table36.AddRow(new string[] { + table37.AddRow(new string[] { "1", "H,20210508,", "Ignored"}); - table36.AddRow(new string[] { + table37.AddRow(new string[] { "2", "D,07777777776,150", "Successful"}); - table36.AddRow(new string[] { + table37.AddRow(new string[] { "3", "T,1,", "Ignored"}); -#line 135 +#line 140 await testRunner.WhenAsync("I get the file \'SafarcomTopup2.txt\' for Estate \'Test Estate 1\' the following file" + - " lines are returned", ((string)(null)), table36, "When "); + " lines are returned", ((string)(null)), table37, "When "); #line hidden - global::Reqnroll.Table table37 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { "ProcessingCompleted", "NumberOfLines", "TotaLines", @@ -654,7 +684,7 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "IgnoredLines", "FailedLines", "NotProcessedLines"}); - table37.AddRow(new string[] { + table38.AddRow(new string[] { "True", "4", "4", @@ -662,33 +692,33 @@ await testRunner.WhenAsync("I get the \'Test Estate 1\' import logs between \'Ye "2", "0", "0"}); -#line 141 +#line 146 await testRunner.WhenAsync("I get the file \'VoucherIssue1.txt\' for Estate \'Test Estate 1\' the following file " + - "information is returned", ((string)(null)), table37, "When "); + "information is returned", ((string)(null)), table38, "When "); #line hidden - global::Reqnroll.Table table38 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { "LineNumber", "Data", "Result"}); - table38.AddRow(new string[] { + table39.AddRow(new string[] { "1", "H,20210508,,", "Ignored"}); - table38.AddRow(new string[] { + table39.AddRow(new string[] { "2", "D,Hospital 1,07777777775,10", "Successful"}); - table38.AddRow(new string[] { + table39.AddRow(new string[] { "3", "D,Hospital 1,testrecipient1@recipient.com,10", "Successful"}); - table38.AddRow(new string[] { + table39.AddRow(new string[] { "4", "T,1,,", "Ignored"}); -#line 145 +#line 150 await testRunner.WhenAsync("I get the file \'VoucherIssue1.txt\' for Estate \'Test Estate 1\' the following file " + - "lines are returned", ((string)(null)), table38, "When "); + "lines are returned", ((string)(null)), table39, "When "); #line hidden } await this.ScenarioCleanupAsync(); diff --git a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature index bc3c9ab..d7beca4 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature +++ b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature @@ -20,6 +20,11 @@ Background: | ClientId | | serviceClient | + When I create the following file profiles + | Alias | FileProfileId | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | + | Safaricom Topup | B2A59ABF-293D-4A6B-B81B-7007503C3476 | Safaricom Topup | /home/txnproc/bulkfiles/safaricom | SafaricomTopupRequest | Safaricom | \n | SafaricomFileFormatHandler | + | Voucher Issue | 8806EDBC-3ED6-406B-9E5F-A9078356BE99 | Voucher Issue | /home/txnproc/bulkfiles/voucher | VoucherRequest | Voucher | \n | VoucherFileFormatHandler | + Given I have created the following estates | EstateName | | Test Estate 1 | @@ -168,4 +173,4 @@ Scenario: Process Safaricom Topup File with Upload Date Time | EstateName | MerchantName | FileProfileId | UserId | UploadDateTime | | Test Estate 1 | Test Merchant 1 | B2A59ABF-293D-4A6B-B81B-7007503C3476 | ABA59ABF-293D-4A6B-B81B-7007503C3476 | 01/09/2021 | - When I get the import log for estate 'Test Estate 1' the date on the import log is '01/09/2021' \ No newline at end of file + When I get the import log for estate 'Test Estate 1' the date on the import log is '01/09/2021' diff --git a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs index 0a0b0da..42082ea 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs +++ b/FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature.cs @@ -111,118 +111,148 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table39 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table39.AddRow(new string[] { + table40.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); - table39.AddRow(new string[] { + table40.AddRow(new string[] { "fileProcessor", "File Processor REST Scope", "A scope for File Processor REST"}); #line 5 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table39, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table40, "Given "); #line hidden - global::Reqnroll.Table table40 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table40.AddRow(new string[] { + table41.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST", "Secret1", "transactionProcessor", "MerchantId, EstateId, role"}); - table40.AddRow(new string[] { + table41.AddRow(new string[] { "fileProcessor", "File Processor REST", "Secret1", "fileProcessor", ""}); #line 10 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table40, "Given "); + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table41, "Given "); #line hidden - global::Reqnroll.Table table41 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table41.AddRow(new string[] { + table42.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", "transactionProcessor,fileProcessor", "client_credentials"}); #line 15 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table41, "Given "); + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table42, "Given "); #line hidden - global::Reqnroll.Table table42 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table42.AddRow(new string[] { + table43.AddRow(new string[] { "serviceClient"}); #line 19 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table42, "Given "); + "s", ((string)(null)), table43, "Given "); #line hidden - global::Reqnroll.Table table43 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { + "Alias", + "FileProfileId", + "Name", + "ListeningDirectory", + "RequestType", + "OperatorName", + "LineTerminator", + "FileFormatHandler"}); + table44.AddRow(new string[] { + "Safaricom Topup", + "B2A59ABF-293D-4A6B-B81B-7007503C3476", + "Safaricom Topup", + "/home/txnproc/bulkfiles/safaricom", + "SafaricomTopupRequest", + "Safaricom", + "\n", + "SafaricomFileFormatHandler"}); + table44.AddRow(new string[] { + "Voucher Issue", + "8806EDBC-3ED6-406B-9E5F-A9078356BE99", + "Voucher Issue", + "/home/txnproc/bulkfiles/voucher", + "VoucherRequest", + "Voucher", + "\n", + "VoucherFileFormatHandler"}); +#line 23 + await testRunner.WhenAsync("I create the following file profiles", ((string)(null)), table44, "When "); +#line hidden + global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table43.AddRow(new string[] { + table45.AddRow(new string[] { "Test Estate 1"}); -#line 23 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table43, "Given "); +#line 28 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table45, "Given "); #line hidden - global::Reqnroll.Table table44 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table44.AddRow(new string[] { + table46.AddRow(new string[] { "Test Estate 1", "Safaricom", "True", "True"}); - table44.AddRow(new string[] { + table46.AddRow(new string[] { "Test Estate 1", "Voucher", "True", "True"}); -#line 27 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table44, "Given "); +#line 32 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table46, "Given "); #line hidden - global::Reqnroll.Table table45 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table45.AddRow(new string[] { + table47.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table45.AddRow(new string[] { + table47.AddRow(new string[] { "Test Estate 1", "Voucher"}); -#line 32 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table45, "And "); +#line 37 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table47, "And "); #line hidden - global::Reqnroll.Table table46 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table46.AddRow(new string[] { + table48.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table46.AddRow(new string[] { + table48.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); -#line 37 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table46, "Given "); +#line 42 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table48, "Given "); #line hidden - global::Reqnroll.Table table47 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -230,7 +260,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table47.AddRow(new string[] { + table49.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -238,7 +268,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table47.AddRow(new string[] { + table49.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -246,10 +276,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "10 KES", "", "Voucher"}); -#line 42 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table47, "When "); +#line 47 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table49, "When "); #line hidden - global::Reqnroll.Table table48 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -257,7 +287,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CalculationType", "FeeDescription", "Value"}); - table48.AddRow(new string[] { + table50.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -265,10 +295,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Fixed", "Merchant Commission", "2.50"}); -#line 47 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table48, "When "); +#line 52 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table50, "When "); #line hidden - global::Reqnroll.Table table49 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -278,7 +308,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table49.AddRow(new string[] { + table51.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -288,70 +318,70 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); -#line 51 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table49, "Given "); +#line 56 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table51, "Given "); #line hidden - global::Reqnroll.Table table50 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table50.AddRow(new string[] { + table52.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table50.AddRow(new string[] { + table52.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); -#line 55 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table50, "Given "); +#line 60 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table52, "Given "); #line hidden - global::Reqnroll.Table table51 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table51.AddRow(new string[] { + table53.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); -#line 60 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table51, "Given "); +#line 65 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table53, "Given "); #line hidden - global::Reqnroll.Table table52 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table52.AddRow(new string[] { + table54.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table52.AddRow(new string[] { + table54.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); -#line 64 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table52, "When "); +#line 69 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table54, "When "); #line hidden - global::Reqnroll.Table table53 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table53.AddRow(new string[] { + table55.AddRow(new string[] { "Deposit1", "300.00", "Today", "Test Merchant 1", "Test Estate 1"}); -#line 69 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table53, "Given "); +#line 74 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table55, "Given "); #line hidden } @@ -372,7 +402,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 74 +#line 79 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -385,37 +415,37 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table54.AddRow(new string[] { + table56.AddRow(new string[] { "H", "20210508", ""}); - table54.AddRow(new string[] { + table56.AddRow(new string[] { "D", "07777777775", "100"}); - table54.AddRow(new string[] { + table56.AddRow(new string[] { "T", "1", ""}); -#line 75 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table54, "Given "); +#line 80 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table56, "Given "); #line hidden - global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table55.AddRow(new string[] { + table57.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 80 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table55, "And "); +#line 85 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table57, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -433,7 +463,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 87 +#line 92 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -446,41 +476,41 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table56.AddRow(new string[] { + table58.AddRow(new string[] { "H", "20210508", ""}); - table56.AddRow(new string[] { + table58.AddRow(new string[] { "D", "07777777775", "100"}); - table56.AddRow(new string[] { + table58.AddRow(new string[] { "D", "07777777776", "200"}); - table56.AddRow(new string[] { + table58.AddRow(new string[] { "T", "2", ""}); -#line 88 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table56, "Given "); +#line 93 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table58, "Given "); #line hidden - global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table57.AddRow(new string[] { + table59.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 94 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table57, "And "); +#line 99 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table59, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -498,7 +528,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 101 +#line 106 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -511,73 +541,73 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table58.AddRow(new string[] { + table60.AddRow(new string[] { "H", "20210508", ""}); - table58.AddRow(new string[] { + table60.AddRow(new string[] { "D", "07777777775", "100"}); - table58.AddRow(new string[] { + table60.AddRow(new string[] { "T", "1", ""}); -#line 102 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table58, "Given "); +#line 107 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table60, "Given "); #line hidden - global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table59.AddRow(new string[] { + table61.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 107 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table59, "And "); +#line 112 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table61, "And "); #line hidden - global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table60.AddRow(new string[] { + table62.AddRow(new string[] { "H", "20210508", ""}); - table60.AddRow(new string[] { + table62.AddRow(new string[] { "D", "07777777776", "150"}); - table60.AddRow(new string[] { + table62.AddRow(new string[] { "D", "07777777777", "50"}); - table60.AddRow(new string[] { + table62.AddRow(new string[] { "T", "2", ""}); -#line 111 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table60, "Given "); +#line 116 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table62, "Given "); #line hidden - global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table61.AddRow(new string[] { + table63.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 117 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table61, "And "); +#line 122 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table63, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -597,7 +627,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 130 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -610,78 +640,78 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table62.AddRow(new string[] { + table64.AddRow(new string[] { "H", "20210508", ""}); - table62.AddRow(new string[] { + table64.AddRow(new string[] { "D", "07777777775", "100"}); - table62.AddRow(new string[] { + table64.AddRow(new string[] { "D", "07777777776", "200"}); - table62.AddRow(new string[] { + table64.AddRow(new string[] { "T", "1", ""}); -#line 126 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table62, "Given "); +#line 131 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table64, "Given "); #line hidden - global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table63.AddRow(new string[] { + table65.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 132 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table63, "And "); +#line 137 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table65, "And "); #line hidden - global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table64.AddRow(new string[] { + table66.AddRow(new string[] { "H", "20210508", ""}); - table64.AddRow(new string[] { + table66.AddRow(new string[] { "D", "07777777775", "100"}); - table64.AddRow(new string[] { + table66.AddRow(new string[] { "D", "07777777776", "200"}); - table64.AddRow(new string[] { + table66.AddRow(new string[] { "T", "1", ""}); -#line 138 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table64, "Given "); +#line 143 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup2.txt\' with the following contents", ((string)(null)), table66, "Given "); #line hidden - global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table65.AddRow(new string[] { + table67.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 144 +#line 149 await testRunner.AndAsync("I upload this file for processing an error should be returned indicating the file" + - " is a duplicate", ((string)(null)), table65, "And "); + " is a duplicate", ((string)(null)), table67, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -699,7 +729,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 155 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -712,79 +742,79 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table66.AddRow(new string[] { + table68.AddRow(new string[] { "H", "20210508", ""}); - table66.AddRow(new string[] { + table68.AddRow(new string[] { "D", "07777777775", "100"}); - table66.AddRow(new string[] { + table68.AddRow(new string[] { "T", "1", ""}); -#line 151 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table66, "Given "); +#line 156 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup.txt\' with the following contents", ((string)(null)), table68, "Given "); #line hidden - global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId", "UploadDateTime"}); - table67.AddRow(new string[] { + table69.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "Today"}); -#line 156 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table67, "And "); +#line 161 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table69, "And "); #line hidden -#line 160 +#line 165 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 - global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3"}); - table68.AddRow(new string[] { + table70.AddRow(new string[] { "H", "20210508", ""}); - table68.AddRow(new string[] { + table70.AddRow(new string[] { "D", "07777777775", "200"}); - table68.AddRow(new string[] { + table70.AddRow(new string[] { "T", "1", ""}); -#line 162 - await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table68, "Given "); +#line 167 + await testRunner.GivenAsync("I have a file named \'SafarcomTopup1.txt\' with the following contents", ((string)(null)), table70, "Given "); #line hidden - global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId", "UploadDateTime"}); - table69.AddRow(new string[] { + table71.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "B2A59ABF-293D-4A6B-B81B-7007503C3476", "ABA59ABF-293D-4A6B-B81B-7007503C3476", "01/09/2021"}); -#line 167 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table69, "And "); +#line 172 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table71, "And "); #line hidden -#line 171 +#line 176 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 50808dd..67152bc 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature +++ b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature @@ -20,6 +20,11 @@ Background: | ClientId | | serviceClient | + When I create the following file profiles + | Alias | FileProfileId | Name | ListeningDirectory | RequestType | OperatorName | LineTerminator | FileFormatHandler | + | Safaricom Topup | B2A59ABF-293D-4A6B-B81B-7007503C3476 | Safaricom Topup | /home/txnproc/bulkfiles/safaricom | SafaricomTopupRequest | Safaricom | \n | SafaricomFileFormatHandler | + | Voucher Issue | 8806EDBC-3ED6-406B-9E5F-A9078356BE99 | Voucher Issue | /home/txnproc/bulkfiles/voucher | VoucherRequest | Voucher | \n | VoucherFileFormatHandler | + Given I have created the following estates | EstateName | | Test Estate 1 | @@ -159,4 +164,4 @@ Scenario: Process Duplicate Voucher Topup File with 1 detail row And I upload this file for processing an error should be returned indicating the file is a duplicate | EstateName | MerchantName | FileProfileId | UserId | - | Test Estate 1 | Test Merchant 1 | 8806EDBC-3ED6-406B-9E5F-A9078356BE99 | ABA59ABF-293D-4A6B-B81B-7007503C3476 | \ No newline at end of file + | Test Estate 1 | Test Merchant 1 | 8806EDBC-3ED6-406B-9E5F-A9078356BE99 | ABA59ABF-293D-4A6B-B81B-7007503C3476 | diff --git a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs index 015ac0b..1ceb2e2 100644 --- a/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs +++ b/FileProcessor.IntegrationTests/Features/ProcessVoucherCSV.feature.cs @@ -113,118 +113,148 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa { #line 4 #line hidden - global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Description"}); - table70.AddRow(new string[] { + table72.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST Scope", "A scope for Transaction Processor REST"}); - table70.AddRow(new string[] { + table72.AddRow(new string[] { "fileProcessor", "File Processor REST Scope", "A scope for File Processor REST"}); #line 5 - await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table70, "Given "); + await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table72, "Given "); #line hidden - global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { "Name", "DisplayName", "Secret", "Scopes", "UserClaims"}); - table71.AddRow(new string[] { + table73.AddRow(new string[] { "transactionProcessor", "Transaction Processor REST", "Secret1", "transactionProcessor", "MerchantId, EstateId, role"}); - table71.AddRow(new string[] { + table73.AddRow(new string[] { "fileProcessor", "File Processor REST", "Secret1", "fileProcessor", ""}); #line 10 - await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table71, "Given "); + await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table73, "Given "); #line hidden - global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { "ClientId", "ClientName", "Secret", "Scopes", "GrantTypes"}); - table72.AddRow(new string[] { + table74.AddRow(new string[] { "serviceClient", "Service Client", "Secret1", "transactionProcessor,fileProcessor", "client_credentials"}); #line 15 - await testRunner.GivenAsync("the following clients exist", ((string)(null)), table72, "Given "); + await testRunner.GivenAsync("the following clients exist", ((string)(null)), table74, "Given "); #line hidden - global::Reqnroll.Table table73 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { "ClientId"}); - table73.AddRow(new string[] { + table75.AddRow(new string[] { "serviceClient"}); #line 19 await testRunner.GivenAsync("I have a token to access the estate management and transaction processor resource" + - "s", ((string)(null)), table73, "Given "); + "s", ((string)(null)), table75, "Given "); #line hidden - global::Reqnroll.Table table74 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { + "Alias", + "FileProfileId", + "Name", + "ListeningDirectory", + "RequestType", + "OperatorName", + "LineTerminator", + "FileFormatHandler"}); + table76.AddRow(new string[] { + "Safaricom Topup", + "B2A59ABF-293D-4A6B-B81B-7007503C3476", + "Safaricom Topup", + "/home/txnproc/bulkfiles/safaricom", + "SafaricomTopupRequest", + "Safaricom", + "\n", + "SafaricomFileFormatHandler"}); + table76.AddRow(new string[] { + "Voucher Issue", + "8806EDBC-3ED6-406B-9E5F-A9078356BE99", + "Voucher Issue", + "/home/txnproc/bulkfiles/voucher", + "VoucherRequest", + "Voucher", + "\n", + "VoucherFileFormatHandler"}); +#line 23 + await testRunner.WhenAsync("I create the following file profiles", ((string)(null)), table76, "When "); +#line hidden + global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { "EstateName"}); - table74.AddRow(new string[] { + table77.AddRow(new string[] { "Test Estate 1"}); -#line 23 - await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table74, "Given "); +#line 28 + await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table77, "Given "); #line hidden - global::Reqnroll.Table table75 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "RequireCustomMerchantNumber", "RequireCustomTerminalNumber"}); - table75.AddRow(new string[] { + table78.AddRow(new string[] { "Test Estate 1", "Safaricom", "True", "True"}); - table75.AddRow(new string[] { + table78.AddRow(new string[] { "Test Estate 1", "Voucher", "True", "True"}); -#line 27 - await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table75, "Given "); +#line 32 + await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table78, "Given "); #line hidden - global::Reqnroll.Table table76 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName"}); - table76.AddRow(new string[] { + table79.AddRow(new string[] { "Test Estate 1", "Safaricom"}); - table76.AddRow(new string[] { + table79.AddRow(new string[] { "Test Estate 1", "Voucher"}); -#line 32 - await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table76, "And "); +#line 37 + await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table79, "And "); #line hidden - global::Reqnroll.Table table77 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription"}); - table77.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract"}); - table77.AddRow(new string[] { + table80.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract"}); -#line 37 - await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table77, "Given "); +#line 42 + await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table80, "Given "); #line hidden - global::Reqnroll.Table table78 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -232,7 +262,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "DisplayText", "Value", "ProductType"}); - table78.AddRow(new string[] { + table81.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -240,7 +270,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "MobileTopup"}); - table78.AddRow(new string[] { + table81.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -248,10 +278,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Custom", "", "Voucher"}); -#line 42 - await testRunner.WhenAsync("I create the following Products", ((string)(null)), table78, "When "); +#line 47 + await testRunner.WhenAsync("I create the following Products", ((string)(null)), table81, "When "); #line hidden - global::Reqnroll.Table table79 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { "EstateName", "OperatorName", "ContractDescription", @@ -259,7 +289,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "CalculationType", "FeeDescription", "Value"}); - table79.AddRow(new string[] { + table82.AddRow(new string[] { "Test Estate 1", "Safaricom", "Safaricom Contract", @@ -267,7 +297,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Fixed", "Merchant Commission", "2.50"}); - table79.AddRow(new string[] { + table82.AddRow(new string[] { "Test Estate 1", "Voucher", "Hospital 1 Contract", @@ -275,10 +305,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Fixed", "Merchant Commission", "2.50"}); -#line 47 - await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table79, "When "); +#line 52 + await testRunner.WhenAsync("I add the following Transaction Fees", ((string)(null)), table82, "When "); #line hidden - global::Reqnroll.Table table80 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { "MerchantName", "AddressLine1", "Town", @@ -288,7 +318,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and "ContactName", "EmailAddress", "EstateName"}); - table80.AddRow(new string[] { + table83.AddRow(new string[] { "Test Merchant 1", "Address Line 1", "TestTown", @@ -298,70 +328,70 @@ await testRunner.GivenAsync("I have a token to access the estate management and "Test Contact 1", "testcontact1@merchant1.co.uk", "Test Estate 1"}); -#line 52 - await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table80, "Given "); +#line 57 + await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table83, "Given "); #line hidden - global::Reqnroll.Table table81 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { "OperatorName", "MerchantName", "MerchantNumber", "TerminalNumber", "EstateName"}); - table81.AddRow(new string[] { + table84.AddRow(new string[] { "Safaricom", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); - table81.AddRow(new string[] { + table84.AddRow(new string[] { "Voucher", "Test Merchant 1", "00000001", "10000001", "Test Estate 1"}); -#line 56 - await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table81, "Given "); +#line 61 + await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table84, "Given "); #line hidden - global::Reqnroll.Table table82 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { "DeviceIdentifier", "MerchantName", "EstateName"}); - table82.AddRow(new string[] { + table85.AddRow(new string[] { "123456780", "Test Merchant 1", "Test Estate 1"}); -#line 61 - await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table82, "Given "); +#line 66 + await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table85, "Given "); #line hidden - global::Reqnroll.Table table83 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table86 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "ContractDescription"}); - table83.AddRow(new string[] { + table86.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Safaricom Contract"}); - table83.AddRow(new string[] { + table86.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "Hospital 1 Contract"}); -#line 65 - await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table83, "When "); +#line 70 + await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table86, "When "); #line hidden - global::Reqnroll.Table table84 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { "Reference", "Amount", "DateTime", "MerchantName", "EstateName"}); - table84.AddRow(new string[] { + table87.AddRow(new string[] { "Deposit1", "300.00", "Today", "Test Merchant 1", "Test Estate 1"}); -#line 70 - await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table84, "Given "); +#line 75 + await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table87, "Given "); #line hidden } @@ -382,7 +412,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 75 +#line 80 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -395,41 +425,41 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table85 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table85.AddRow(new string[] { + table88.AddRow(new string[] { "H", "20210508", "", ""}); - table85.AddRow(new string[] { + table88.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "10"}); - table85.AddRow(new string[] { + table88.AddRow(new string[] { "T", "1", "", ""}); -#line 76 - await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table85, "Given "); +#line 81 + await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table88, "Given "); #line hidden - global::Reqnroll.Table table86 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table86.AddRow(new string[] { + table89.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 81 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table86, "And "); +#line 86 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table89, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -447,7 +477,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 88 +#line 93 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -460,41 +490,41 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table87 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table90 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table87.AddRow(new string[] { + table90.AddRow(new string[] { "H", "20210508", "", ""}); - table87.AddRow(new string[] { + table90.AddRow(new string[] { "D", "Hospital 1", "07777777775", "10"}); - table87.AddRow(new string[] { + table90.AddRow(new string[] { "T", "1", "", ""}); -#line 89 - await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table87, "Given "); +#line 94 + await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table90, "Given "); #line hidden - global::Reqnroll.Table table88 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table91 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table88.AddRow(new string[] { + table91.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 94 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table88, "And "); +#line 99 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table91, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -512,7 +542,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 101 +#line 106 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -525,46 +555,46 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table89 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table92 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table89.AddRow(new string[] { + table92.AddRow(new string[] { "H", "20210508", "", ""}); - table89.AddRow(new string[] { + table92.AddRow(new string[] { "D", "Hospital 1", "07777777775", "10"}); - table89.AddRow(new string[] { + table92.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "10"}); - table89.AddRow(new string[] { + table92.AddRow(new string[] { "T", "1", "", ""}); -#line 102 - await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table89, "Given "); +#line 107 + await testRunner.GivenAsync("I have a file named \'VoucherIssue.txt\' with the following contents", ((string)(null)), table92, "Given "); #line hidden - global::Reqnroll.Table table90 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table93 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table90.AddRow(new string[] { + table93.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 108 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table90, "And "); +#line 113 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table93, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -582,7 +612,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 120 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -595,87 +625,87 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table91 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table94 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table91.AddRow(new string[] { + table94.AddRow(new string[] { "H", "20210508", "", ""}); - table91.AddRow(new string[] { + table94.AddRow(new string[] { "D", "Hospital 1", "07777777775", "10"}); - table91.AddRow(new string[] { + table94.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "10"}); - table91.AddRow(new string[] { + table94.AddRow(new string[] { "T", "1", "", ""}); -#line 116 - await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table91, "Given "); +#line 121 + await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table94, "Given "); #line hidden - global::Reqnroll.Table table92 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table95 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table92.AddRow(new string[] { + table95.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 122 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table92, "And "); +#line 127 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table95, "And "); #line hidden - global::Reqnroll.Table table93 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table96 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table93.AddRow(new string[] { + table96.AddRow(new string[] { "H", "20210508", "", ""}); - table93.AddRow(new string[] { + table96.AddRow(new string[] { "D", "Hospital 1", "07777777775", "20"}); - table93.AddRow(new string[] { + table96.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "20"}); - table93.AddRow(new string[] { + table96.AddRow(new string[] { "T", "1", "", ""}); -#line 126 - await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table93, "Given "); +#line 131 + await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table96, "Given "); #line hidden - global::Reqnroll.Table table94 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table97 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table94.AddRow(new string[] { + table97.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 132 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table94, "And "); +#line 137 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table97, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -695,7 +725,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and 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 140 +#line 145 this.ScenarioInitialize(scenarioInfo, ruleInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -708,88 +738,88 @@ await testRunner.GivenAsync("I have a token to access the estate management and #line 4 await this.FeatureBackgroundAsync(); #line hidden - global::Reqnroll.Table table95 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table98 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table95.AddRow(new string[] { + table98.AddRow(new string[] { "H", "20210508", "", ""}); - table95.AddRow(new string[] { + table98.AddRow(new string[] { "D", "Hospital 1", "07777777775", "10"}); - table95.AddRow(new string[] { + table98.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "20"}); - table95.AddRow(new string[] { + table98.AddRow(new string[] { "T", "1", "", ""}); -#line 141 - await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table95, "Given "); +#line 146 + await testRunner.GivenAsync("I have a file named \'VoucherIssue1.txt\' with the following contents", ((string)(null)), table98, "Given "); #line hidden - global::Reqnroll.Table table96 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table99 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table96.AddRow(new string[] { + table99.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 147 - await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table96, "And "); +#line 152 + await testRunner.AndAsync("I upload this file for processing", ((string)(null)), table99, "And "); #line hidden - global::Reqnroll.Table table97 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table100 = new global::Reqnroll.Table(new string[] { "Column1", "Column2", "Column3", "Column4"}); - table97.AddRow(new string[] { + table100.AddRow(new string[] { "H", "20210508", "", ""}); - table97.AddRow(new string[] { + table100.AddRow(new string[] { "D", "Hospital 1", "07777777775", "10"}); - table97.AddRow(new string[] { + table100.AddRow(new string[] { "D", "Hospital 1", "testrecipient1@recipient.com", "20"}); - table97.AddRow(new string[] { + table100.AddRow(new string[] { "T", "1", "", ""}); -#line 153 - await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table97, "Given "); +#line 158 + await testRunner.GivenAsync("I have a file named \'VoucherIssue2.txt\' with the following contents", ((string)(null)), table100, "Given "); #line hidden - global::Reqnroll.Table table98 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table101 = new global::Reqnroll.Table(new string[] { "EstateName", "MerchantName", "FileProfileId", "UserId"}); - table98.AddRow(new string[] { + table101.AddRow(new string[] { "Test Estate 1", "Test Merchant 1", "8806EDBC-3ED6-406B-9E5F-A9078356BE99", "ABA59ABF-293D-4A6B-B81B-7007503C3476"}); -#line 160 +#line 165 await testRunner.AndAsync("I upload this file for processing an error should be returned indicating the file" + - " is a duplicate", ((string)(null)), table98, "And "); + " is a duplicate", ((string)(null)), table101, "And "); #line hidden } await this.ScenarioCleanupAsync();