lukasz-antoniak commented on code in PR #2052:
URL:
https://github.com/apache/cassandra-java-driver/pull/2052#discussion_r2689116244
##########
core/src/test/java/com/datastax/dse/driver/internal/core/data/geometry/DefaultLineStringTest.java:
##########
@@ -101,8 +104,26 @@ public void should_parse_valid_geo_json() {
}
@Test
- public void should_convert_to_geo_json() {
- assertThat(lineString.asGeoJson()).isEqualTo(json);
+ public void should_convert_to_geo_json() throws Exception {
+
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode root = mapper.readTree(lineString.asGeoJson());
+ assertThat(root.get("type").toString()).isEqualTo("\"LineString\"");
+
+ double expected[][] = {{30.0, 10.0}, {10.0, 30.0}, {40.0, 40.0}};
+ JsonNode coordinatesNode = root.get("coordinates");
Review Comment:
Yeah, looks little better IMO.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]