generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test added for major creditor ref data and file names changed for cou…
…rts and offences
- Loading branch information
rajanigandra
authored and
rajanigandra
committed
May 22, 2024
1 parent
9064e22
commit 983a484
Showing
5 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/functionalTest/java/uk/gov/hmcts/opal/steps/MajorCreditorsStepDef.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package uk.gov.hmcts.opal.steps; | ||
|
||
import io.cucumber.java.en.Then; | ||
import io.cucumber.java.en.When; | ||
import net.serenitybdd.rest.SerenityRest; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
|
||
import static net.serenitybdd.rest.SerenityRest.then; | ||
import static uk.gov.hmcts.opal.config.Constants.MAJOR_CREDITORS_URI; | ||
|
||
import static uk.gov.hmcts.opal.steps.BearerTokenStepDef.getToken; | ||
|
||
public class MajorCreditorsStepDef extends BaseStepDef { | ||
|
||
static Logger log = LoggerFactory.getLogger(OffencesStepDef.class.getName()); | ||
|
||
@When("I make a request to the major creditors ref data api filter by major creditor id {int}") | ||
public void getRequestToMajorCreditorsBy(int majorCreditorId) { | ||
log.info("THE URL----" + getTestUrl() + MAJOR_CREDITORS_URI); | ||
|
||
SerenityRest | ||
.given() | ||
.accept("*/*") | ||
.header("Authorization", "Bearer " + getToken()) | ||
.contentType("application/json") | ||
.when() | ||
.get(getTestUrl() + MAJOR_CREDITORS_URI + majorCreditorId) | ||
.then().log().all(); | ||
} | ||
|
||
@Then("the major creditors ref data matching to result") | ||
public void theMajorCreditorsRefDataMatchingToResult() { | ||
then().assertThat() | ||
.statusCode(200); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/functionalTest/resources/features/opalMode/majorCreditorFeatures.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Feature: Verifying the end points for the Major Creditors | ||
|
||
@PO-349 @Opal | ||
Scenario: Verifying the end points for the major creditors | ||
Given I am testing as the "opal-test@hmcts.net" user | ||
When I make a request to the major creditors ref data api filter by major creditor id 15 | ||
Then the major creditors ref data matching to result |