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

[ESWE-1181] Employer Creation; MN API client, registrar; revise tests #20

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

rickchoijd
Copy link
Contributor

  • implemented MNJobBoardApiClient, with integration tests
  • implemented EmployerRegistrar
  • rename test objects' file to EmployerObjects
  • EmployerService is incomplete
  • revise tests of JobsBoardApiClient

- implemented `MNJobBoardApiClient`, with integration tests
- implemented `EmployerRegistrar`
- rename test objects' file to `EmployerObjects`
- `EmployerService` is incomplete
- revise tests of JobsBoardApiClient
@rickchoijd rickchoijd requested a review from gbmojo January 23, 2025 21:52
@@ -33,6 +33,7 @@ generic-service:
EXAMPLE_API_CLIENT_SECRET: "TEMPLATE_KOTLIN_API_CLIENT_SECRET"
API_CLIENT_ID: "SYSTEM_CLIENT_ID"
API_CLIENT_SECRET: "SYSTEM_CLIENT_SECRET"
MN_JOBBOARD_API_TOKEN: "MN_JOBBOARD_API_TOKEN"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

map secret value to env var, for MN APi client's authorisation

@@ -14,6 +14,7 @@ generic-service:
# TODO: This should be replaced by a call to a different service, or removed
EXAMPLE_API_URL: "https://jobs-board-integration-api-preprod.hmpps.service.justice.gov.uk"
API_BASE_URL_JOBSBOARD: "https://jobs-board-api-preprod.hmpps.service.justice.gov.uk"
API_BASE_URL_MNJOBBOARD: "https://preprodservices.sequation.net/sequation-job-api" # URL to be confirmed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actual URL is TBD

@@ -11,6 +11,7 @@ generic-service:
# TODO: This should be replaced by a call to a different service, or removed
EXAMPLE_API_URL: "https://jobs-board-integration-api.hmpps.service.justice.gov.uk"
API_BASE_URL_JOBSBOARD: "https://jobs-board-api.hmpps.service.justice.gov.uk"
API_BASE_URL_MNJOBBOARD: "https://liveservices.sequation.net/sequation-job-api" # URL to be confirmed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actual URL is TBD

Comment on lines +25 to +34
fun convert(employer: Employer) = employer.run {
MNEmployer(
employerName = name,
employerBio = description,
// FIXME translate from employer.sector
sectorId = 1,
// FIXME translate from employer.status
partnerId = 1,
)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is incomplete.
ID mapping will be implemented next.

object EmployerMother {
object EmployerObjects {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renaming test objects' holder as per previous comments

@rickchoijd rickchoijd merged commit e7373a2 into main Jan 28, 2025
12 checks passed
@rickchoijd rickchoijd deleted the ESWE-1181-mn-api-client branch January 28, 2025 11:37
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