use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class ValueSetTest method serialize.
@Test
public void serialize() throws Exception {
JsonPath jsonPath = getJsonPath(valueSet);
assertThat(jsonPath.getString("url"), equalTo("http://who.org"));
assertThat(jsonPath.getString("version"), equalTo("20130131"));
assertThat(jsonPath.getString("name"), equalTo("refsetName"));
assertThat(jsonPath.getString("description"), equalTo("descriptionString"));
assertThat(jsonPath.getString("title"), equalTo("refsetTitle"));
assertThat(jsonPath.get("expansion.parameter.name"), hasItem("paramName"));
assertThat(jsonPath.get("expansion.contains.system"), hasItem("systemUri"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class StructureViewTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(structureView);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(structureView));
assertThat(jsonPath.getString("element[0].path"), equalTo("path"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class ComposeTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(compose);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(compose));
assertThat(jsonPath.getString("include[0].system"), equalTo("includeSystem"));
assertThat(jsonPath.getString("exclude[0].system"), equalTo("excludeSystem"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class GroupTest method serializeWithMissingOptionalFields.
@Test
public void serializeWithMissingOptionalFields() throws Exception {
Group group = Group.builder().addElement(ConceptMapElement.builder().code("ElementCode").display("ElementDisplay").build()).build();
JsonPath jsonPath = getJsonPath(group);
assertNull(jsonPath.get("source"));
assertNull(jsonPath.get("sourceVersion"));
assertNull(jsonPath.get("target"));
assertNull(jsonPath.get("targetVersion"));
assertThat(jsonPath.get("element.code"), hasItem("ElementCode"));
assertThat(jsonPath.get("element.display"), hasItem("ElementDisplay"));
assertNull(jsonPath.get("unmapped"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class UnMappedTest method serializeWithMissingOptionalFields.
@Test
public void serializeWithMissingOptionalFields() throws Exception {
UnMapped unMapped = UnMapped.builder().mode("Mode").build();
JsonPath jsonPath = getJsonPath(unMapped);
assertNull(jsonPath.get("code"));
}
Aggregations