use of de.codecentric.boot.admin.server.domain.values.Endpoint in project spring-boot-admin by codecentric.
the class EndpointMixinTest method verifySerialize.
@Test
public void verifySerialize() throws IOException {
Endpoint endpoint = Endpoint.of("info", "http://localhost:8080/info");
JsonContent<Endpoint> jsonContent = jsonTester.write(endpoint);
assertThat(jsonContent).extractingJsonPathStringValue("$.id").isEqualTo("info");
assertThat(jsonContent).extractingJsonPathStringValue("$.url").isEqualTo("http://localhost:8080/info");
}
use of de.codecentric.boot.admin.server.domain.values.Endpoint in project spring-boot-admin by codecentric.
the class EndpointMixinTest method verifyDeserialize.
@Test
public void verifyDeserialize() throws JSONException, JsonProcessingException {
String json = new JSONObject().put("id", "info").put("url", "http://localhost:8080/info").toString();
Endpoint endpoint = objectMapper.readValue(json, Endpoint.class);
assertThat(endpoint).isNotNull();
assertThat(endpoint.getId()).isEqualTo("info");
assertThat(endpoint.getUrl()).isEqualTo("http://localhost:8080/info");
}
Aggregations