Search in sources :

Example 51 with JsonPath

use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.

the class TargetTest method serializeWithMissingOptionalFields.

@Test
public void serializeWithMissingOptionalFields() throws Exception {
    Target target = Target.builder().build();
    JsonPath jsonPath = getJsonPath(target);
    assertNull(jsonPath.get("code"));
    assertNull(jsonPath.get("display"));
    assertNull(jsonPath.get("equivalence"));
    assertNull(jsonPath.get("comment"));
    assertNull(jsonPath.get("dependsOn"));
    assertNull(jsonPath.get("product"));
}
Also used : Target(com.b2international.snowowl.fhir.core.model.conceptmap.Target) JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 52 with JsonPath

use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.

the class BindingTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(binding);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(binding));
    assertThat(jsonPath.getString("id"), equalTo("id"));
    assertThat(jsonPath.getString("strength"), equalTo("strength"));
    assertThat(jsonPath.getString("valueSetUri"), equalTo("valueSetUri"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 53 with JsonPath

use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.

the class OverloadTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(overload);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(overload));
    assertThat(jsonPath.getString("id"), equalTo("id"));
    assertThat(jsonPath.getString("parameterName[0]"), equalTo("parameterName"));
    assertThat(jsonPath.getString("comment"), equalTo("comment"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 54 with JsonPath

use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.

the class ExpansionParameterTest method serializeUriParameter.

@Test
public void serializeUriParameter() throws Exception {
    UriParameter parameter = UriParameter.builder().name("paramName").value(new Uri("paramValue")).build();
    JsonPath jsonPath = getJsonPath(parameter);
    assertThat(jsonPath.getString("name"), equalTo("paramName"));
    assertThat(jsonPath.get("valueUri"), equalTo("paramValue"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) Uri(com.b2international.snowowl.fhir.core.model.dt.Uri) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 55 with JsonPath

use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.

the class ExpansionParameterTest method serializeStringParameter.

@Test
public void serializeStringParameter() throws Exception {
    StringParameter parameter = StringParameter.builder().name("paramName").value("paramValue").build();
    JsonPath jsonPath = getJsonPath(parameter);
    assertThat(jsonPath.getString("name"), equalTo("paramName"));
    assertThat(jsonPath.get("valueString"), equalTo("paramValue"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Aggregations

JsonPath (io.restassured.path.json.JsonPath)117 Test (org.junit.Test)101 FhirTest (com.b2international.snowowl.fhir.tests.FhirTest)82 Response (io.restassured.response.Response)9 Fhir (com.b2international.snowowl.fhir.core.model.dt.Parameters.Fhir)8 Date (java.util.Date)6 Property (com.b2international.snowowl.fhir.core.model.codesystem.Property)4 Coding (com.b2international.snowowl.fhir.core.model.dt.Coding)4 SubProperty (com.b2international.snowowl.fhir.core.model.dt.SubProperty)4 CodeSystem (com.b2international.snowowl.fhir.core.model.codesystem.CodeSystem)3 Uri (com.b2international.snowowl.fhir.core.model.dt.Uri)3 HashMap (java.util.HashMap)3 TranslateResult (com.b2international.snowowl.fhir.core.model.conceptmap.TranslateResult)2 BigDecimal (java.math.BigDecimal)2 SimpleDateFormat (java.text.SimpleDateFormat)2 ArrayList (java.util.ArrayList)2 AbstractIntegrationTest (org.codice.ddf.itests.common.AbstractIntegrationTest)2 MappingJackson2HttpMessageConverter (org.springframework.http.converter.json.MappingJackson2HttpMessageConverter)2 MockMvc (org.springframework.test.web.servlet.MockMvc)2 OperationOutcomeCode (com.b2international.snowowl.fhir.core.codesystems.OperationOutcomeCode)1