Skip to content

Commit

Permalink
Fix step def
Browse files Browse the repository at this point in the history
  • Loading branch information
apurbraj committed May 20, 2024
1 parent 6c0f977 commit a209ea7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,12 @@ public void iCallTheBatchTransactionsEndpointWithExpectedStatusOfAndCallbackurlA
logger.info("Batch Transactions Response: " + scenarioScopeState.response);
}

@And("I should assert total txn count and successful txn count in payment batch detail response for batch account lookup")
public void iShouldAssertTotalTxnCountAndSuccessfulTxnCountInPaymentBatchDetailResponseForBatchAccountLookup() {
assertThat(scenarioScopeState.paymentBatchDetail).isNotNull();
assertThat(scenarioScopeState.paymentBatchDetail.getInstructionList().size()).isEqualTo(3);
@And("I should assert total txn count and successful txn count with {int} txns in payment batch detail response for batch account lookup")
public void iShouldAssertTotalTxnCountAndSuccessfulTxnCountInPaymentBatchDetailResponseForBatchAccountLookup(int expectedCount) {
await().atMost(awaitMost, SECONDS).pollDelay(pollDelay, SECONDS).pollInterval(pollInterval, SECONDS).untilAsserted(() -> {
assertThat(scenarioScopeState.paymentBatchDetail).isNotNull();
assertThat(scenarioScopeState.paymentBatchDetail.getInstructionList().size()).isEqualTo(expectedCount);
});
}

@And("I am able to parse actuator response")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,11 @@ public void iWillAssertTheFieldsFromFetchBeneficiaryResponse() {
public void iCreateAnIdentityMapperDTOForRegisterBeneficiaryFromCsvFile() {
List<BeneficiaryDTO> beneficiaryDTOList = new ArrayList<>();
payeeIdentity = generateUniqueNumber(16);
BeneficiaryDTO beneficiaryDTO = new BeneficiaryDTO("3001003873110196", "00", null, "gorilla");
BeneficiaryDTO beneficiaryDTO = new BeneficiaryDTO("1038731101961", "00", null, "gorilla");
beneficiaryDTOList.add(beneficiaryDTO);
beneficiaryDTO = new BeneficiaryDTO("3001003874120160", "00", null, "gorilla");
beneficiaryDTO = new BeneficiaryDTO("1038741201602", "00", null, "gorilla");
beneficiaryDTOList.add(beneficiaryDTO);
beneficiaryDTO = new BeneficiaryDTO("3001003873110195", "00", null, "rhino");
beneficiaryDTO = new BeneficiaryDTO("1038731101953", "00", null, "gorilla");
beneficiaryDTOList.add(beneficiaryDTO);
requestId = generateUniqueNumber(12);
registerBeneficiaryBody = new AccountMapperRequestDTO(requestId, sourceBBID, beneficiaryDTOList);
Expand Down
16 changes: 9 additions & 7 deletions src/test/java/resources/identityMapperTest.feature
Original file line number Diff line number Diff line change
Expand Up @@ -239,21 +239,23 @@ Feature: Identity Account Mapper Api Test
And I will assert the fields from fetch beneficiary response
@gov @ext
Scenario: Batch Account Lookup Integration Test
Given I create an IdentityMapperDTO for Register Beneficiary from csv file
When I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiaryApiTest"
# And I will sleep for 3000 millisecond
Given I have tenant as "paymentBB1"
And I have the demo csv file "ph-ee-bulk-demo-7.csv"
Given I have tenant as "paymentbb1"
And I have the demo csv file "bulk_payment.csv"
And I create a list of payee identifiers from csv file
And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200
And I create a IdentityMapperDTO for registering beneficiary
Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary"
And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration
And I create a new clientCorrelationId
And I have private key
And I generate signature
When I call the batch transactions endpoint with expected status of 202
And I am able to parse batch transactions response
And I fetch batch ID from batch transaction API's response
# Then I will sleep for 10000 millisecond
And I call the payment batch detail API with expected status of 200 with total 3 txns
And I call the payment batch detail API with expected status of 200 with total 6 txns
Then I am able to parse payment batch detail response
And I should assert total txn count and successful txn count in payment batch detail response for batch account lookup
And I should assert total txn count and successful txn count with 6 txns in payment batch detail response for batch account lookup

@gov
Scenario: RB-011 Attempt to Register a 5 Beneficiary - 4 with a valid RegistrationInstitution and 1 with a invalid RegistrationInstitution not available in PayBB
Expand Down

0 comments on commit a209ea7

Please sign in to comment.