Search in sources :

Example 41 with JsonPath

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

the class GroupTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(group);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(group));
    assertThat(jsonPath.getString("source"), equalTo("Source"));
    assertThat(jsonPath.getString("sourceVersion"), equalTo("SourceVersion"));
    assertThat(jsonPath.get("target"), equalTo("Target"));
    assertThat(jsonPath.get("targetVersion"), equalTo("TargetVersion"));
    assertThat(jsonPath.get("element.code"), hasItem("ElementCode"));
    assertThat(jsonPath.get("element.display"), hasItem("ElementDisplay"));
    assertThat(jsonPath.get("unmapped.mode"), equalTo("Mode"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 42 with JsonPath

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

the class UnMappedTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(unMapped);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(unMapped));
    assertThat(jsonPath.getString("url"), equalTo("uri"));
    assertThat(jsonPath.getString("display"), equalTo("display"));
    assertThat(jsonPath.getString("code"), equalTo("code"));
    assertThat(jsonPath.getString("mode"), equalTo("fixed"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 43 with JsonPath

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

the class ParameterTest method serialize.

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

Example 44 with JsonPath

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

the class InteractionTest method serialize.

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

Example 45 with JsonPath

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

the class RestTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(rest);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(rest));
    assertThat(jsonPath.getString("documentation"), equalTo("documentation"));
}
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