Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public ProcessLogonTransactionRequest()
public Guid EstateId { get; }

/// <summary>
/// Gets the imei number.
/// Gets the device identifier.
/// </summary>
/// <value>
/// The imei number.
/// The device identifier.
/// </value>
public String DeviceIdentifier { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public interface ITransactionProcessorACLApplicationService
/// <param name="deviceIdentifier">The device identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
Task<ProcessLogonTransactionResponse> ProcessLogonTransaction(Guid estateId, Guid merchantId, DateTime transactionDateTime, String transactionNumber, String deviceIdentifier, CancellationToken cancellationToken);
Task<ProcessLogonTransactionResponse> ProcessLogonTransaction(Guid estateId,
Guid merchantId,
DateTime transactionDateTime,
String transactionNumber,
String deviceIdentifier,
CancellationToken cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public async Task<ProcessLogonTransactionResponse> ProcessLogonTransaction(Guid
{
TypeNameHandling = TypeNameHandling.All
});
ProcessLogonTransactionResponse response = new ProcessLogonTransactionResponse();

ProcessLogonTransactionResponse response = null;

try
{
Expand All @@ -106,8 +107,11 @@ public async Task<ProcessLogonTransactionResponse> ProcessLogonTransaction(Guid
if (ex.InnerException is InvalidOperationException)
{
// This means there is an error in the request
response.ResponseCode = "0001"; // Request Message error
response.ResponseMessage = ex.InnerException.Message;
response = new ProcessLogonTransactionResponse
{
ResponseCode = "0001", // Request Message error
ResponseMessage = ex.InnerException.Message
};
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<ItemGroup>
<PackageReference Include="MediatR" Version="7.0.0" />
<PackageReference Include="SecurityService.Client" Version="0.0.6.2" />
<PackageReference Include="Shared" Version="0.0.7" />
<PackageReference Include="TransactionProcessor.Client" Version="0.0.4" />
<PackageReference Include="Shared" Version="0.0.8.1" />
<PackageReference Include="TransactionProcessor.Client" Version="0.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
dockerCredentials,
securityServiceContainerName,
eventStoreContainerName,
(null,null));
("serviceClient", "Secret1"));

IContainerService securityServiceContainer = DockerHelper.SetupSecurityServiceContainer(securityServiceContainerName,
this.Logger,
Expand All @@ -164,8 +164,9 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
traceFolder,
dockerCredentials,
securityServiceContainerName,
estateManagementApiContainerName,
eventStoreContainerName,
(null, null));
("serviceClient", "Secret1"));

IContainerService transactionProcessorACLContainer = DockerHelper.SetupTransactionProcessorACLContainer(transactionProcessorACLContainerName,
this.Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ Background:
Scenario: Logon Transaction
Given I am logged in as "merchantuser@testmerchant1.co.uk" with password "123456" for Merchant "Test Merchant 1" for Estate "Test Estate 1" with client "merchantClient"
When I perform the following transactions
| DateTime | TransactionNumber | TransactionType | MerchantName | IMEINumber | EstateName |
| DateTime | TransactionNumber | TransactionType | MerchantName | DeviceIdentifier | EstateName |
| Today | 1 | Logon | Test Merchant 1 | 123456789 | Test Estate 1 |

Given I am logged in as "merchantuser@testmerchant2.co.uk" with password "123456" for Merchant "Test Merchant 2" for Estate "Test Estate 1" with client "merchantClient"
When I perform the following transactions
| DateTime | TransactionNumber | TransactionType | MerchantName | IMEINumber | EstateName |
| DateTime | TransactionNumber | TransactionType | MerchantName | DeviceIdentifier | EstateName |
| Today | 2 | Logon | Test Merchant 2 | 123456789 | Test Estate 1 |

Given I am logged in as "merchantuser@testmerchant3.co.uk" with password "123456" for Merchant "Test Merchant 3" for Estate "Test Estate 2" with client "merchantClient"
When I perform the following transactions
| DateTime | TransactionNumber | TransactionType | MerchantName | IMEINumber | EstateName |
| Today | 3 | Logon | Test Merchant 3 | 123456789 | Test Estate 2 |
| DateTime | TransactionNumber | TransactionType | MerchantName | DeviceIdentifier | EstateName |
| Today | 3 | Logon | Test Merchant 3 | 123456789 | Test Estate 2 |

Then transaction response should contain the following information
| EstateName | MerchantName | TransactionNumber | TransactionType | ResponseCode | ResponseMessage |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public async Task WhenIPerformTheFollowingTransactions(Table table)
DateTime transactionDateTime = SpecflowTableHelper.GetDateForDateString(dateString, DateTime.Today);
String transactionNumber = SpecflowTableHelper.GetStringRowValue(tableRow, "TransactionNumber");
String transactionType = SpecflowTableHelper.GetStringRowValue(tableRow, "TransactionType");
String imeiNumber = SpecflowTableHelper.GetStringRowValue(tableRow, "IMEINumber");
String deviceIdentifier = SpecflowTableHelper.GetStringRowValue(tableRow, "DeviceIdentifier");

switch (transactionType)
{
Expand All @@ -312,7 +312,7 @@ public async Task WhenIPerformTheFollowingTransactions(Table table)
transactionDateTime,
transactionType,
transactionNumber,
imeiNumber,
deviceIdentifier,
CancellationToken.None);

estateDetails.AddTransactionResponse(merchantId, transactionNumber, transactionType, responseMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="0.0.7" />
<PackageReference Include="ClientProxyBase" Version="0.0.8.1" />
<PackageReference Include="Ductus.FluentDocker" Version="2.7.3" />
<PackageReference Include="EstateManagement.Client" Version="0.0.7" />
<PackageReference Include="EstateManagement.Client" Version="0.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="SecurityService.Client" Version="0.0.6.2" />
<PackageReference Include="Shared.IntegrationTesting" Version="0.0.7" />
<PackageReference Include="Shared.IntegrationTesting" Version="0.0.8.1" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="SpecFlow" Version="3.1.74" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.1.74" />
<PackageReference Include="SpecFlow.xUnit" Version="3.1.74" />
<PackageReference Include="TransactionProcessor.Client" Version="0.0.4" />
<PackageReference Include="TransactionProcessor.Client" Version="0.0.5" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 2 additions & 2 deletions TransactionProcessorACL.Testing/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{
using System;
using System.Collections.Generic;
using BusinessLogic.Requests;
using DataTransferObjects;
using Models;
using Newtonsoft.Json;
using SecurityService.DataTransferObjects.Responses;
using TransactionProcessor.DataTransferObjects;
using TransactionProcessorACL.BusinessLogic.Requests;
using TransactionProcessorACL.DataTransferObjects;

/// <summary>
///
Expand Down
2 changes: 1 addition & 1 deletion TransactionProcessorACL/TransactionProcessorACL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.1" />
<PackageReference Include="Shared" Version="0.0.7" />
<PackageReference Include="Shared" Version="0.0.8.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.0.0-rc4" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="5.0.0-rc8" />
Expand Down