Skip to content

Commit 2246036

Browse files
Merge pull request #811 from TransactionProcessing/nightly/#807_fix_nightly
Enhance error handling in estate retrieval process
2 parents eb632cc + e973243 commit 2246036

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

TransactionProcessor.IntegrationTesting.Helpers/TransactionProcessorSteps.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,12 +995,13 @@ public async Task WhenIGetTheEstateTheEstateSecurityUserDetailsAreReturnedAsFoll
995995
}
996996
}
997997

998-
public async Task WhenIGetTheEstateAnErrorIsReturned(String accessToken, String estateName, List<EstateDetails> estateDetailsList)
998+
public async Task WhenIGetTheEstateAnErrorIsReturned(String accessToken, String estateName, List<EstateDetails> estateDetailsList, String errorStatus)
999999
{
10001000
Guid estateId = Guid.NewGuid();
10011001
Result<EstateResponse>? result = await this.TransactionProcessorClient.GetEstate(accessToken, estateId, CancellationToken.None).ConfigureAwait(false);
10021002
result.IsSuccess.ShouldBeFalse();
1003-
result.Status.ShouldBe(ResultStatus.NotFound);
1003+
ResultStatus status = Enum.Parse<ResultStatus>(errorStatus);
1004+
result.Status.ShouldBe(status);
10041005
}
10051006

10061007
public async Task WhenIRemoveTheOperatorFromEstateTheOperatorIsRemoved(String accessToken, List<EstateDetails> estateDetailsList, String estateName, String operatorName)

TransactionProcessor.IntegrationTests/Features/Estate.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Scenario: Get Estate
5050
| EmailAddress |
5151
| estateuser1@testestate1.co.uk |
5252
| estateuser2@testestate1.co.uk |
53-
When I get the estate "Test Estate 2" an error is returned
53+
When I get the estate "Test Estate 2" a "NotFound" error is returned
5454
Given I am logged in as "[email protected]" with password "123456" for Estate "Test Estate 1" with client "estateClient"
5555
When I get the estate "Test Estate 1" the estate details are returned as follows
5656
| EstateName |
@@ -63,7 +63,7 @@ Scenario: Get Estate
6363
| EmailAddress |
6464
| estateuser1@testestate1.co.uk |
6565
| estateuser2@testestate1.co.uk |
66-
When I get the estate "Test Estate 2" an error is returned
66+
When I get the estate "Test Estate 2" a "Failure" error is returned
6767

6868
Scenario: Update Estate
6969
Given I have created the following estates

TransactionProcessor.IntegrationTests/Features/Estate.feature.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TransactionProcessor.IntegrationTests/Shared/SharedSteps.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,19 @@ public async Task WhenIGetTheEstateTheEstateSecurityUserDetailsAreReturnedAsFoll
467467
await this.TransactionProcessorSteps.WhenIGetTheEstateTheEstateSecurityUserDetailsAreReturnedAsFollows(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates, securityUsers);
468468
}
469469

470-
[When(@"I get the estate ""(.*)"" an error is returned")]
471-
public async Task WhenIGetTheEstateAnErrorIsReturned(String estateName)
470+
//[When(@"I get the estate ""(.*)"" an error is returned")]
471+
//public async Task WhenIGetTheEstateAnErrorIsReturned(String estateName)
472+
//{
473+
// await this.TransactionProcessorSteps.WhenIGetTheEstateAnErrorIsReturned(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates);
474+
//}
475+
476+
[When("I get the estate {string} a {string} error is returned")]
477+
public async Task WhenIGetTheEstateAErrorIsReturned(String estateName, string errorStatus)
472478
{
473-
await this.TransactionProcessorSteps.WhenIGetTheEstateAnErrorIsReturned(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates);
479+
await this.TransactionProcessorSteps.WhenIGetTheEstateAnErrorIsReturned(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates, errorStatus);
474480
}
475481

482+
476483
[Given(@"I am logged in as ""(.*)"" with password ""(.*)"" for Estate ""(.*)"" with client ""(.*)""")]
477484
public async Task GivenIAmLoggedInAsWithPasswordForEstate(String username,
478485
String password,

0 commit comments

Comments
 (0)