Search in sources :

Example 91 with JsonPath

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

the class OperationDefinitionTest method serialize.

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

Example 92 with JsonPath

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

the class DiscriminatorTest method serialize.

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

Example 93 with JsonPath

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

the class MappingTest method serialize.

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

Example 94 with JsonPath

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

the class StructureDefinitionTest method serialize.

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

Example 95 with JsonPath

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

the class ExpansionTest method serialize.

@Test
public void serialize() throws Exception {
    printPrettyJson(expansion);
    JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(expansion));
    assertThat(jsonPath.getString("identifier"), equalTo("identifier"));
    assertThat(jsonPath.getString("total"), equalTo("200"));
    assertThat(jsonPath.getString("contains[0].system"), equalTo("systemUri"));
    assertThat(jsonPath.getString("parameter[0].name"), containsString("ParamName"));
}
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