|
@@ -51,7 +51,7 @@ public class GeometryParserTests extends ESTestCase {
|
|
|
assertEquals(new Point(100, 0), format.fromXContent(parser));
|
|
|
XContentBuilder newGeoJson = XContentFactory.jsonBuilder();
|
|
|
format.toXContent(new Point(100, 10), newGeoJson, ToXContent.EMPTY_PARAMS);
|
|
|
- assertEquals("{\"type\":\"point\",\"coordinates\":[100.0,10.0]}", Strings.toString(newGeoJson));
|
|
|
+ assertEquals("{\"type\":\"Point\",\"coordinates\":[100.0,10.0]}", Strings.toString(newGeoJson));
|
|
|
}
|
|
|
|
|
|
XContentBuilder pointGeoJsonWithZ = XContentFactory.jsonBuilder()
|
|
@@ -148,7 +148,7 @@ public class GeometryParserTests extends ESTestCase {
|
|
|
// if we serialize non-null value - it should be serialized as geojson
|
|
|
format.toXContent(new Point(100, 10), newGeoJson, ToXContent.EMPTY_PARAMS);
|
|
|
newGeoJson.endObject();
|
|
|
- assertEquals("{\"val\":{\"type\":\"point\",\"coordinates\":[100.0,10.0]}}", Strings.toString(newGeoJson));
|
|
|
+ assertEquals("{\"val\":{\"type\":\"Point\",\"coordinates\":[100.0,10.0]}}", Strings.toString(newGeoJson));
|
|
|
|
|
|
newGeoJson = XContentFactory.jsonBuilder().startObject().field("val");
|
|
|
format.toXContent(null, newGeoJson, ToXContent.EMPTY_PARAMS);
|