Search in sources :

Example 76 with JsonPath

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

the class ImplementationTest method serialize.

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

Example 77 with JsonPath

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

the class MessagingTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(messaging);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(messaging));
    assertThat(jsonPath.getInt("reliableCache"), equalTo(1));
    assertThat(jsonPath.getString("documentation"), equalTo("documentation"));
    assertThat(jsonPath.getString("endpoint[0].protocol.code"), equalTo("code"));
    assertThat(jsonPath.getString("supportedMessage[0].mode"), equalTo("sender"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 78 with JsonPath

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

the class ResourceTest method serialize.

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

Example 79 with JsonPath

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

the class SoftwareTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(software);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(software));
    assertThat(jsonPath.getString("name"), equalTo("name"));
    assertThat(jsonPath.getString("version"), equalTo("version"));
    assertThat(jsonPath.getString("extension[0].url"), equalTo("extensionUrl"));
    assertThat(jsonPath.getString("extension[0].valueString"), equalTo("stringValue"));
}
Also used : JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 80 with JsonPath

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

the class IdentiferTest method serialize.

@Test
public void serialize() throws Exception {
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(identifier));
    assertThat(jsonPath.getString("use"), equalTo("official"));
    assertThat(jsonPath.getString("system"), equalTo("system"));
    assertThat(jsonPath.getString("value"), equalTo("value"));
    assertThat(jsonPath.getString("type.text"), equalTo("codingText"));
    assertThat(jsonPath.getString("type.coding[0].code"), equalTo("codingCode"));
    assertThat(jsonPath.getString("type.coding[0].display"), equalTo("codingDisplay"));
    assertThat(jsonPath.getString("period.start"), equalTo("2018-03-23T07:49:40.000+0000"));
    assertThat(jsonPath.getString("period.end"), equalTo("2018-03-24T07:49:40.000+0000"));
    assertThat(jsonPath.getString("assigner.reference"), equalTo("reference url"));
    assertThat(jsonPath.getString("assigner.display"), equalTo("displayString"));
    assertThat(jsonPath.getString("assigner.identifier.system"), equalTo("system"));
}
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