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"));
}
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"));
}
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"));
}
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"));
}
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"));
}
Aggregations