}
@Ignore
@Test
public void testPoint() throws Exception {
AcceptChangesBehaviour behaviour=new AcceptChangesBehaviour(Point.class, false);
EditBlackboard bb = handler.getEditBlackboard();
EditGeom editGeom = bb.getGeoms().get(0);
bb.addPoint(10,10,editGeom.getShell());
try{
behaviour.getCommand(handler);
fail();
}catch (IllegalArgumentException e) {
// good
}
handler.setCurrentShape(editGeom.getShell());
// test create point
UndoableMapCommand command = behaviour.getCommand(handler);
command.setMap(handler.getContext().getMap());
command.run(new NullProgressMonitor());
assertEquals(toCoord(bb,10,10), ((Geometry) feature.getDefaultGeometry()).getCoordinates()[0]);
FeatureIterator<SimpleFeature> features = layer.getResource(FeatureSource.class, null).getFeatures().features();
SimpleFeature next = features.next();
assertEquals( toCoord(bb,10,10), ((Geometry) next.getDefaultGeometry()).getCoordinates()[0] );
assertEquals(Point.class, feature.getDefaultGeometry().getClass());
bb.addPoint(40,10,bb.newGeom(null, null).getShell());
handler.getCurrentGeom().setChanged(true);
SimpleFeatureType type = DataUtilities.createType("MultiPoint", "*geom:MultiPoint"); //$NON-NLS-1$ //$NON-NLS-2$
feature = SimpleFeatureBuilder.template(type, feature.getID());
((TestLayer)handler.getContext().getMap().getMapLayers().get(0)).setSchema(type);
((Map)handler.getContext().getMap()).getEditManagerInternal().setEditFeature(feature, layer);
// test create Multi Point
command = behaviour.getCommand(handler);
command.setMap(handler.getContext().getMap());
command.run(new NullProgressMonitor());
assertFalse(handler.getCurrentGeom().isChanged());
assertEquals(toCoord(bb,10,10), ((Geometry) feature.getDefaultGeometry()).getCoordinates()[0]);
assertEquals(toCoord(bb,40,10), ((Geometry) feature.getDefaultGeometry()).getCoordinates()[1]);