use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class TargetTest method serializeWithMissingOptionalFields.
@Test
public void serializeWithMissingOptionalFields() throws Exception {
Target target = Target.builder().build();
JsonPath jsonPath = getJsonPath(target);
assertNull(jsonPath.get("code"));
assertNull(jsonPath.get("display"));
assertNull(jsonPath.get("equivalence"));
assertNull(jsonPath.get("comment"));
assertNull(jsonPath.get("dependsOn"));
assertNull(jsonPath.get("product"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class BindingTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(binding);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(binding));
assertThat(jsonPath.getString("id"), equalTo("id"));
assertThat(jsonPath.getString("strength"), equalTo("strength"));
assertThat(jsonPath.getString("valueSetUri"), equalTo("valueSetUri"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class OverloadTest method serialize.
@Test
public void serialize() throws Exception {
printPrettyJson(overload);
JsonPath jsonPath = JsonPath.from(objectMapper.writeValueAsString(overload));
assertThat(jsonPath.getString("id"), equalTo("id"));
assertThat(jsonPath.getString("parameterName[0]"), equalTo("parameterName"));
assertThat(jsonPath.getString("comment"), equalTo("comment"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class ExpansionParameterTest method serializeUriParameter.
@Test
public void serializeUriParameter() throws Exception {
UriParameter parameter = UriParameter.builder().name("paramName").value(new Uri("paramValue")).build();
JsonPath jsonPath = getJsonPath(parameter);
assertThat(jsonPath.getString("name"), equalTo("paramName"));
assertThat(jsonPath.get("valueUri"), equalTo("paramValue"));
}
use of io.restassured.path.json.JsonPath in project snow-owl by b2ihealthcare.
the class ExpansionParameterTest method serializeStringParameter.
@Test
public void serializeStringParameter() throws Exception {
StringParameter parameter = StringParameter.builder().name("paramName").value("paramValue").build();
JsonPath jsonPath = getJsonPath(parameter);
assertThat(jsonPath.getString("name"), equalTo("paramName"));
assertThat(jsonPath.get("valueString"), equalTo("paramValue"));
}
Aggregations