// good
}
handler.setCurrentState(EditState.MODIFYING);
EditGeom editGeom = handler.getEditBlackboard().getGeoms().get(0);
handler.setCurrentShape(editGeom.getShell());
handler.getEditBlackboard().addPoint(0,0, handler.getCurrentShape());
handler.getEditBlackboard().addPoint(100,0, handler.getCurrentShape());
handler.getEditBlackboard().addPoint(100,100, handler.getCurrentShape());
handler.getEditBlackboard().addPoint(0,100, handler.getCurrentShape());
handler.getEditBlackboard().addPoint(0,0, handler.getCurrentShape());
UndoableMapCommand command = behavior.getCommand(handler, event, EventType.RELEASED);
command.setMap((Map) handler.getContext().getMap());
if (command instanceof PostDeterminedEffectCommand) {
PostDeterminedEffectCommand c = (PostDeterminedEffectCommand) command;
c.execute(new NullProgressMonitor());
}else{
command.run(new NullProgressMonitor());
}
assertEquals("Current shape should equal new hole", editGeom.getHoles().get(0), handler.getCurrentShape()); //$NON-NLS-1$
assertEquals("A point should have been added to hole", Point.valueOf(10,10), handler.getCurrentShape().getPoint(0)); //$NON-NLS-1$
assertEquals( EditState.CREATING, handler.getCurrentState());
command.rollback(new NullProgressMonitor());
assertEquals( editGeom.getShell(), handler.getCurrentShape());
assertEquals(0, editGeom.getHoles().size());
assertEquals( EditState.MODIFYING, handler.getCurrentState());
}