@Test
public void testMultiPoint()
{
final List<Location> locations = Arrays.asList(Location.EIFFEL_TOWER, Location.COLOSSEUM);
final GeoJsonObject object = new GeoJsonBuilder().create(locations,
GeoJsonType.MULTI_POINT);
Assert.assertEquals(
"{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\":[[2.294495,48.858241],[12.49234,41.890224]]}}",
object.toString());
object.withNewProperty("property", "value");
Assert.assertEquals(
"{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\":[[2.294495,48.858241],[12.49234,41.890224]]},\"properties\":{\"property\":\"value\"}}",
object.toString());
object.withNewProperty("property2", "value2");
Assert.assertEquals(
"{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\":[[2.294495,48.858241],[12.49234,41.890224]]},\"properties\":{\"property\":\"value\",\"property2\":\"value2\"}}",
object.toString());
}