@Test public void testStart() { double x = 15d; double y = 1.5d; tested.start(x, y); verify(view, times(1)).setCanvas(eq(canvas)); verify(view, times(1)).onCreate(any()); verify(view, times(1)).onAccept(any()); verify(view, times(1)).onDestroy(any()); verify(view, times(1)).start(eq(x), eq(y)); }
@Override public void start(final double x, final double y) { view .onCreate(this::createProxy) .onAccept(this::acceptProxy) .onDestroy(this::destroyProxy) .setCanvas(getCanvas()) .start(x, y); }
ElementProxy implements ShapeProxy { @Override public void start(final double x, final double y) { view .onCreate(this::createProxy) .onAccept(this::acceptProxy) .onDestroy(this::destroyProxy) .setCanvas(getCanvas()) .start(x, y); } }
ElementProxy implements ShapeProxy { @Override public void start(final double x, final double y) { view .onCreate(this::createProxy) .onAccept(this::acceptProxy) .onDestroy(this::destroyProxy) .setCanvas(getCanvas()) .start(x, y); } @Inject  ElementProxy(final SessionCommandManager<AbstractCanvasHandler> commandManager,
                        final Event<CanvasSelectionEvent> selectionEvent,
                        final @Any ManagedInstance<DefaultCanvasCommandFactory> commandFactories,
                        final DefinitionUtils definitionUtils); }
ElementProxy implements ShapeProxy { @Override public void start(final double x, final double y) { view .onCreate(this::createProxy) .onAccept(this::acceptProxy) .onDestroy(this::destroyProxy) .setCanvas(getCanvas()) .start(x, y); } @Inject  ElementProxy(final SessionCommandManager<AbstractCanvasHandler> commandManager,
                        final Event<CanvasSelectionEvent> selectionEvent,
                        final @Any ManagedInstance<DefaultCanvasCommandFactory> commandFactories,
                        final DefinitionUtils definitionUtils); @SuppressWarnings("unchecked") ElementProxy setView(final ShapeProxyView<? extends ElementShape> view); ElementProxy setProxyBuilder(final Supplier<ElementShape> proxyBuilder); ElementProxy setCanvasHandler(final AbstractCanvasHandler canvasHandler); @Override void start(final double x,
                      final double y); @Override void destroy(); CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command); Canvas getCanvas(); AbstractCanvasHandler getCanvasHandler(); }
ElementProxy implements ShapeProxy { @Override public void start(final double x, final double y) { view .onCreate(this::createProxy) .onAccept(this::acceptProxy) .onDestroy(this::destroyProxy) .setCanvas(getCanvas()) .start(x, y); } @Inject  ElementProxy(final SessionCommandManager<AbstractCanvasHandler> commandManager,
                        final Event<CanvasSelectionEvent> selectionEvent,
                        final @Any ManagedInstance<DefaultCanvasCommandFactory> commandFactories,
                        final DefinitionUtils definitionUtils); @SuppressWarnings("unchecked") ElementProxy setView(final ShapeProxyView<? extends ElementShape> view); ElementProxy setProxyBuilder(final Supplier<ElementShape> proxyBuilder); ElementProxy setCanvasHandler(final AbstractCanvasHandler canvasHandler); @Override void start(final double x,
                      final double y); @Override void destroy(); CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command); Canvas getCanvas(); AbstractCanvasHandler getCanvasHandler();  }