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 @@ -124,7 +124,7 @@ public async Task<Guid> CreateEstateUser(Guid estateId,
Claims = new Dictionary<String, String>()
};

//createUserRequest.Roles.Add("Estate");
createUserRequest.Roles.Add("Estate");
createUserRequest.Claims.Add("EstateId", estateId.ToString());

CreateUserResponse createUserResponse = await this.SecurityServiceClient.CreateUser(createUserRequest, cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public async Task<Guid> CreateMerchantUser(Guid estateId,
Claims = new Dictionary<String, String>()
};

//createUserRequest.Roles.Add("Estate");
createUserRequest.Roles.Add("Merchant");
createUserRequest.Claims.Add("EstateId", estateId.ToString());
createUserRequest.Claims.Add("MerchantId", merchantId.ToString());

Expand Down
1 change: 1 addition & 0 deletions EstateManagement.IntegrationTests/Common/DockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class DockerHelper
protected IContainerService EventStoreContainer;

public IEstateClient EstateClient;

protected HttpClient HttpClient;

protected String EventStoreConnectionString;
Expand Down
4 changes: 4 additions & 0 deletions EstateManagement.IntegrationTests/Estate/Estate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Feature: Estate

Background:
Given the following security roles exist
| RoleName |
| Estate |

Scenario: Create Estate
When I create the following estates
Expand All @@ -13,6 +16,7 @@ Scenario: Create Operator
Given I have created the following estates
| EstateName |
| Test Estate 1 |

When I create the following operators
| EstateName | OperatorName | RequireCustomMerchantNumber | RequireCustomTerminalNumber |
| Test Estate 1 | Test Operator 1 | True | True |
Expand Down
53 changes: 30 additions & 23 deletions EstateManagement.IntegrationTests/Estate/Estate.feature.cs

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 @@ -13,7 +13,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="NLog" Version="4.6.8" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.1" />
<PackageReference Include="SecurityService.Client" Version="0.0.4" />
<PackageReference Include="SecurityService.Client" Version="0.0.5" />
<PackageReference Include="Shared" Version="0.0.5.1" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="SpecFlow" Version="3.1.67" />
Expand Down
13 changes: 10 additions & 3 deletions EstateManagement.IntegrationTests/Merchant/Merchant.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,36 @@ Background:
Given I have created the following estates
| EstateName |
| Test Estate 1 |

Given I have created the following operators
| EstateName | OperatorName | RequireCustomMerchantNumber | RequireCustomTerminalNumber |
| Test Estate 1 | Test Operator 1 | True | True |

Scenario: Create Merchant
Given the following security roles exist
| RoleName |
| Merchant |

Scenario: Create Merchant
When I create the following merchants
| MerchantName | AddressLine1 | Town | Region | Country | ContactName | EmailAddress | EstateName |
| Test Merchant 1 | Address Line 1 | TestTown | Test Region | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 |

@PRTest
Scenario: Assign Operator To Merchant
Scenario: Assign Operator To Merchant
Given I create the following merchants
| MerchantName | AddressLine1 | Town | Region | Country | ContactName | EmailAddress | EstateName |
| Test Merchant 1 | Address Line 1 | TestTown | Test Region | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 |

When I assign the following operator to the merchants
| OperatorName | MerchantName | MerchantNumber | TerminalNumber |
| Test Operator 1 | Test Merchant 1 | 00000001 | 10000001 |

@PRTest
Scenario: Create Security User
Scenario: Create Security User
Given I create the following merchants
| MerchantName | AddressLine1 | Town | Region | Country | ContactName | EmailAddress | EstateName |
| Test Merchant 1 | Address Line 1 | TestTown | Test Region | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 |

When I create the following security users
| EmailAddress | Password | GivenName | FamilyName | MerchantName |
| merchantuser1@testmerchant1.co.uk | 123456 | TestMerchant | User1 | Test Merchant 1 |
Expand Down
Loading