@Test public void testNewCanvasCommandUndo() { final CanvasCommand<AbstractCanvasHandler> command = new UpdateDomainObjectPropertyCommand(domainObject, PROPERTY_ID, VALUE).newCanvasCommand(canvasHandler); assertThat(command).isInstanceOf(UpdateDomainObjectPropertyCommand.RefreshPropertiesPanelCommand.class); assertThat(command.undo(canvasHandler)).isEqualTo(CanvasCommandResultBuilder.SUCCESS); verify(canvasHandler).notifyCanvasDomainObjectUpdated(eq(domainObject)); }
@Override protected AbstractCanvasCommand newCanvasCommand(final AbstractCanvasHandler context) { return new RefreshPropertiesPanelCommand(); }
UpdateDomainObjectPropertyCommand extends AbstractCanvasGraphCommand { @Override protected AbstractCanvasCommand newCanvasCommand(final AbstractCanvasHandler context) { return new RefreshPropertiesPanelCommand(); } }
UpdateDomainObjectPropertyCommand extends AbstractCanvasGraphCommand { @Override protected AbstractCanvasCommand newCanvasCommand(final AbstractCanvasHandler context) { return new RefreshPropertiesPanelCommand(); } UpdateDomainObjectPropertyCommand(final DomainObject domainObject,
                                             final String propertyId,
                                             final Object value); }
UpdateDomainObjectPropertyCommand extends AbstractCanvasGraphCommand { @Override protected AbstractCanvasCommand newCanvasCommand(final AbstractCanvasHandler context) { return new RefreshPropertiesPanelCommand(); } UpdateDomainObjectPropertyCommand(final DomainObject domainObject,
                                             final String propertyId,
                                             final Object value); @Override String toString(); }
UpdateDomainObjectPropertyCommand extends AbstractCanvasGraphCommand { @Override protected AbstractCanvasCommand newCanvasCommand(final AbstractCanvasHandler context) { return new RefreshPropertiesPanelCommand(); } UpdateDomainObjectPropertyCommand(final DomainObject domainObject,
                                             final String propertyId,
                                             final Object value); @Override String toString();  }