use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class ExampleTest method serialize.
@Test
public void serialize() throws Exception {
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(example));
assertThat(jsonPath.getString("id"), equalTo("id"));
assertThat(jsonPath.getString("label"), equalTo("label"));
assertThat(jsonPath.getString("valueString"), equalTo("string"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class TypeTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(type);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(type));
assertThat(jsonPath.getString("id"), equalTo("id"));
assertThat(jsonPath.getString("code"), equalTo("code"));
assertThat(jsonPath.getString("profile"), equalTo("profile"));
assertThat(jsonPath.getString("targetProfile"), equalTo("targetProfile"));
assertThat(jsonPath.getString("aggregation[0]"), equalTo("bundled"));
assertThat(jsonPath.getString("versioning"), equalTo("either"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class ContainsTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(contains);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(contains));
assertThat(jsonPath.getString("system"), equalTo("systemUri"));
assertThat(jsonPath.getString("inactive"), equalTo("false"));
assertThat(jsonPath.getString("abstract"), equalTo("true"));
assertThat(jsonPath.getString("version"), equalTo("20140131"));
assertThat(jsonPath.getString("code"), equalTo("Code"));
assertThat(jsonPath.getString("display"), equalTo("displayValue"));
assertThat(jsonPath.getString("contains[0].code"), equalTo("nestedContains"));
assertThat(jsonPath.getString("designation[0].language"), equalTo("en-us"));
assertThat(jsonPath.getString("designation[0].value"), equalTo("pt"));
assertThat(jsonPath.getString("designation[0].languageCode"), equalTo("en-us"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class MappingElementTest method serialize.
@Test
public void serialize() throws Exception {
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(mappingElement));
assertThat(jsonPath.getString("id"), equalTo("id"));
assertThat(jsonPath.getString("identity"), equalTo("identity"));
assertThat(jsonPath.getString("map"), equalTo("map"));
assertThat(jsonPath.getString("comment"), equalTo("comment"));
assertThat(jsonPath.getString("language"), equalTo("en"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class SlicingTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(slicing);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(slicing));
assertThat(jsonPath.getBoolean("ordered"), equalTo(true));
assertThat(jsonPath.getString("rules"), equalTo("open"));
assertThat(jsonPath.getString("discriminator[0].id"), equalTo("id"));
assertThat(jsonPath.getString("discriminator[0].type"), equalTo("value"));
assertThat(jsonPath.getString("discriminator[0].path"), equalTo("path"));
}
Aggregations