-
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.
Merge pull request #27 from companieshouse/DSDN-1696
added get endpoint and service
- Loading branch information
Showing
11 changed files
with
452 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Feature: Get individual | ||
|
||
Scenario Outline: Get individual successfully | ||
Given Psc data api service is running | ||
And a PSC exists for "<company_number>" | ||
When a Get request is sent for "<company_number>" and "<notificationId>" | ||
And the Get call response body should match "<result>" file | ||
Then I should receive 200 status code | ||
|
||
Examples: | ||
| company_number | notificationId | result | | ||
| 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ | individual_get_request_result | | ||
|
||
|
||
|
||
Scenario Outline: Get Individual when sending get request without Eric headers | ||
|
||
Given Psc data api service is running | ||
And a PSC exists for "<company_number>" | ||
When a Get request is sent for "<company_number>" and "<notificationId>" without ERIC headers | ||
Then I should receive 401 status code | ||
|
||
Examples: | ||
| company_number | notificationId | | ||
| 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ | | ||
|
||
Scenario Outline: Get PSC unsuccessfully - PSC resource does not exist | ||
Given a PSC does not exist for "<company_number>" | ||
When a Get request has been sent for "<company_number>" and "<notificationId>" | ||
Then I should receive 404 status code | ||
|
||
Examples: | ||
| company_number | notificationId | | ||
| 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ | | ||
|
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
37 changes: 37 additions & 0 deletions
37
src/itest/resources/json/output/individual_get_request_result.json
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,37 @@ | ||
{ | ||
"address": { | ||
"address_line_1" : "ura_line1", | ||
"address_line_2" : "ura_line2", | ||
"care_of" : "ura_care_of", | ||
"country" : "United Kingdom", | ||
"locality" : "Cardiff", | ||
"po_box" : "ura_po", | ||
"postal_code" : "CF2 1B6", | ||
"premises" : "URA", | ||
"region" : "ura_region" | ||
}, | ||
"ceased_on": "2021-11-02T08:47:45", | ||
"country_of_residence": "United Kingdom", | ||
"date_of_birth": { | ||
"day": 21, | ||
"month": 10, | ||
"year": 1995 | ||
}, | ||
"etag": "string", | ||
"kind": "individual-person-with-significant-control", | ||
"links": { | ||
"self": "/company/34777772/persons-with-significant-control/individual/ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ", | ||
"statement": "string" | ||
}, | ||
"name": "34777772", | ||
"name_elements": { | ||
"forename": "PHIL", | ||
"other_forenames": "tom", | ||
"surname": "JONES", | ||
"title": "Mr" | ||
}, | ||
"nationality": "British", | ||
"natures_of_control": [ | ||
"part-right-to-share-surplus-assets-75-to-100-percent" | ||
] | ||
} |
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
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
Oops, something went wrong.