use of com.ibm.cohort.fhir.client.config.DefaultFhirClientBuilder in project quality-measure-and-cohort-service by Alvearie.
the class FhirClientTimeoutTest method testDefaultFhirClientBuilder_handlesDelayWithConfiguration.
@Test
public void testDefaultFhirClientBuilder_handlesDelayWithConfiguration() {
FhirServerConfig fhirServerConfig = getFhirServerConfig();
fhirServerConfig.setSocketTimeout(CONFIG_NO_TIMEOUT_MILLIS);
DefaultFhirClientBuilder builder = new DefaultFhirClientBuilder(fhirContext);
IGenericClient client = builder.createFhirClient(fhirServerConfig);
Patient patient = client.read().resource(Patient.class).withId(PATIENT_ID).execute();
Enumerations.AdministrativeGender actual = patient.getGender();
Assert.assertEquals(Enumerations.AdministrativeGender.OTHER, actual);
}
use of com.ibm.cohort.fhir.client.config.DefaultFhirClientBuilder in project quality-measure-and-cohort-service by Alvearie.
the class FhirClientTimeoutTest method testDefaultFhirClientBuilder_handlesDelayDefault.
@Test
public void testDefaultFhirClientBuilder_handlesDelayDefault() {
FhirServerConfig fhirServerConfig = getFhirServerConfig();
fhirServerConfig.setSocketTimeout(null);
DefaultFhirClientBuilder builder = new DefaultFhirClientBuilder(fhirContext);
IGenericClient client = builder.createFhirClient(fhirServerConfig);
Patient patient = client.read().resource(Patient.class).withId(PATIENT_ID).execute();
Enumerations.AdministrativeGender actual = patient.getGender();
Assert.assertEquals(Enumerations.AdministrativeGender.OTHER, actual);
}
Aggregations