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 @@ -995,12 +995,13 @@ public async Task WhenIGetTheEstateTheEstateSecurityUserDetailsAreReturnedAsFoll
}
}

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

public async Task WhenIRemoveTheOperatorFromEstateTheOperatorIsRemoved(String accessToken, List<EstateDetails> estateDetailsList, String estateName, String operatorName)
Expand Down
4 changes: 2 additions & 2 deletions TransactionProcessor.IntegrationTests/Features/Estate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Scenario: Get Estate
| EmailAddress |
| estateuser1@testestate1.co.uk |
| estateuser2@testestate1.co.uk |
When I get the estate "Test Estate 2" an error is returned
When I get the estate "Test Estate 2" a "NotFound" error is returned
Given I am logged in as "estateuser1@testestate1.co.uk" with password "123456" for Estate "Test Estate 1" with client "estateClient"
When I get the estate "Test Estate 1" the estate details are returned as follows
| EstateName |
Expand All @@ -63,7 +63,7 @@ Scenario: Get Estate
| EmailAddress |
| estateuser1@testestate1.co.uk |
| estateuser2@testestate1.co.uk |
When I get the estate "Test Estate 2" an error is returned
When I get the estate "Test Estate 2" a "Failure" error is returned

Scenario: Update Estate
Given I have created the following estates
Expand Down

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

13 changes: 10 additions & 3 deletions TransactionProcessor.IntegrationTests/Shared/SharedSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,19 @@ public async Task WhenIGetTheEstateTheEstateSecurityUserDetailsAreReturnedAsFoll
await this.TransactionProcessorSteps.WhenIGetTheEstateTheEstateSecurityUserDetailsAreReturnedAsFollows(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates, securityUsers);
}

[When(@"I get the estate ""(.*)"" an error is returned")]
public async Task WhenIGetTheEstateAnErrorIsReturned(String estateName)
//[When(@"I get the estate ""(.*)"" an error is returned")]
//public async Task WhenIGetTheEstateAnErrorIsReturned(String estateName)
//{
// await this.TransactionProcessorSteps.WhenIGetTheEstateAnErrorIsReturned(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates);
//}

[When("I get the estate {string} a {string} error is returned")]
public async Task WhenIGetTheEstateAErrorIsReturned(String estateName, string errorStatus)
{
await this.TransactionProcessorSteps.WhenIGetTheEstateAnErrorIsReturned(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates);
await this.TransactionProcessorSteps.WhenIGetTheEstateAnErrorIsReturned(this.TestingContext.AccessToken, estateName, this.TestingContext.Estates, errorStatus);
}


[Given(@"I am logged in as ""(.*)"" with password ""(.*)"" for Estate ""(.*)"" with client ""(.*)""")]
public async Task GivenIAmLoggedInAsWithPasswordForEstate(String username,
String password,
Expand Down
Loading