Package ca.cdr.test.app.harness.api
Interface SmileHarness
- All Known Implementing Classes:
DockerSmileHarness
public interface SmileHarness
Interface for interacting with a Smile CDR instance during testing.
Provides methods to obtain various clients for communicating with the CDR,
including administrative JSON clients and FHIR clients with different
authentication levels.
-
Method Summary
Modifier and TypeMethodDescriptionGets an administrative JSON client for interacting with the CDR's admin API.getAdminJsonClient
(int thePort) Gets an administrative JSON client for interacting with the CDR's admin API on a specific port.Gets a standard FHIR client.getFhirClient
(int thePort) Gets a standard FHIR client on a specific port.getFhirClient
(String theModuleId) Gets a standard FHIR client for a specific module.Gets the FHIR context used by this harness.getFhirContext
(String moduleId) Gets the FHIR context for a specific module.Gets an HL7V2 REST client for interacting with the CDR's HL7V2 endpoint.getHL7V2RestClient
(int thePort) Gets an HL7V2 REST client for interacting with the CDR's HL7V2 endpoint on a specific port.getHL7V2RestClient
(String theModuleId) Gets an HL7V2 REST client for a specific module.Gets a FHIR client with superuser privileges.getSuperuserFhirClient
(int thePort) Gets a FHIR client with superuser privileges on a specific port.getSuperuserFhirClient
(String theModuleId) Gets a FHIR client with superuser privileges for a specific module.
-
Method Details
-
getAdminJsonClient
Gets an administrative JSON client for interacting with the CDR's admin API. This will create an @{link JsonRestClient} with the first available ADMIN_JSON moduledmin- Returns:
- An autodiscovered AdminJsonRestClient.
-
getAdminJsonClient
Gets an administrative JSON client for interacting with the CDR's admin API on a specific port.- Parameters:
thePort
- The port to connect to- Returns:
- The admin JSON client configured with the specified port
-
getSuperuserFhirClient
Gets a FHIR client with superuser privileges. This will create an @{link IGenericClient} with the first available FHIR_ENDPOINT module- Returns:
- The FHIR client with superuser authentication
-
getSuperuserFhirClient
Gets a FHIR client with superuser privileges on a specific port.- Parameters:
thePort
- The port to connect to- Returns:
- The FHIR client with superuser authentication on the specified port
-
getSuperuserFhirClient
Gets a FHIR client with superuser privileges for a specific module.- Parameters:
theModuleId
- The ID of the module to connect to- Returns:
- The FHIR client with superuser authentication for the specified module
-
getFhirClient
Gets a standard FHIR client.- Returns:
- The FHIR client with default authentication
-
getFhirClient
Gets a standard FHIR client on a specific port.- Parameters:
thePort
- The port to connect to- Returns:
- The FHIR client with default authentication on the specified port
-
getFhirClient
Gets a standard FHIR client for a specific module.- Parameters:
theModuleId
- The ID of the module to connect to- Returns:
- The FHIR client with default authentication for the specified module
-
getFhirContext
Gets the FHIR context used by this harness.- Returns:
- The FHIR context
-
getFhirContext
Gets the FHIR context for a specific module.- Parameters:
moduleId
- The ID of the module- Returns:
- The FHIR context for the specified module
-
getHL7V2RestClient
Gets an HL7V2 REST client for interacting with the CDR's HL7V2 endpoint.- Returns:
- The HL7V2 REST client configured with default port
-
getHL7V2RestClient
Gets an HL7V2 REST client for interacting with the CDR's HL7V2 endpoint on a specific port.- Parameters:
thePort
- The port to connect to- Returns:
- The HL7V2 REST client configured with the specified port
-
getHL7V2RestClient
Gets an HL7V2 REST client for a specific module.- Parameters:
theModuleId
- The ID of the module to connect to- Returns:
- The HL7V2 REST client for the specified module
-