Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHEE-712] Create batch status API negative test cases #22

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dhruvsonagara
Copy link

Description

PHEE-712 Create batch status API negative test cases

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Followed the PR title naming convention mentioned above.

  • Acknowledge that we will not merge PRs that are not passing the checks ("green") - it is your (author's) responsibility to get a proposed PR to pass all the checks, not primarily the project's maintainers.

  • The PR title should include a JIRA ticket

  • Design-related bullet points or design document links related to this PR added in the description above.

  • Updated corresponding Postman Collection or API documentation for the changes in this PR.

  • Create/update unit or integration tests for verifying the changes made.

  • Add required Swagger annotation and update API documentation with details of any API changes if applicable

  • Followed the naming conventions as given in https://docs.google.com/document/d/1Q4vaMSzrTxxh9TS0RILuNkSkYCxotuYk1Xe0CMIkkCU/edit?usp=sharing

  • Followed coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

FYI our guidelines for code reviews same as https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

// Construct the endpoint with the invalid date parameters
String endpoint = String.format("%s?dateFrom=%s&dateTo=%s", operationsAppConfig.transactionRequestsEndpoint, invalidStartDate,
invalidEndDate);
String fullUrl = operationsAppConfig.operationAppContactPoint + endpoint;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line can be avoided. by either updating line above or the logger line below.

// Construct the endpoint with the invalid values
String endpoint = String.format("%s?registeringInstitutionId=%s&payerFsp=%s&batchId=%s",
operationsAppConfig.transactionRequestsEndpoint, registeringInstitutionId, payerFsp, batchId);
String fullUrl = operationsAppConfig.operationAppContactPoint + endpoint;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line can be avoided. by either updating line above or the logger line below.

.spec(new ResponseSpecBuilder().expectStatusCode(expectedStatus).build()).when()
.post(channelConnectorConfig.transferReqEndpoint).andReturn().asString();
scenarioScopeState.tenant = tenant;
scenarioScopeState.response = RestAssured.given(requestSpec).header("Content-Type", "application/json")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use constants

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This files were changed because of spotless those are not new feature introduced by me

logger.info("Post Transfer Response: {}", scenarioScopeState.response);
RequestSpecification requestSpec = Utils.getDefaultSpec();
scenarioScopeState.tenant = tenant;
scenarioScopeState.response = RestAssured.given(requestSpec).header("Content-Type", "application/json")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use constants

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This files were changed because of spotless those are not new feature introduced by me


Scenario: BS-001,002,003 Batches API with invalid offset, limit and sort value
Given I have tenant as "paymentbb2"
When I call the Batches API with invalid offset, limit and sort value expecting status of 400
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add more details about the values sent so that this file gives complete idea about the testcase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants