@Test public void testAccept() { tested.init(canvasHandler); final boolean accept = tested.accept(parent, new Node[]{candidate}); assertTrue(accept); verify(commandManager, times(1)).execute(eq(canvasHandler), eq(updateChildrenCommand)); assertEquals(parent, updateChildrenCommand.getParent()); assertEquals(candidate, updateChildrenCommand.getCandidates().iterator().next()); verify(highlight, times(1)).unhighLight(); }
@Override public boolean accept(final Element parent, final Node[] children) { return evaluate(parent, children, command -> getCommandManager().execute(getCanvasHandler(), command), false); }
ContainmentAcceptorControlImpl extends AbstractAcceptorControl implements ContainmentAcceptorControl<AbstractCanvasHandler> { @Override public boolean accept(final Element parent, final Node[] children) { return evaluate(parent, children, command -> getCommandManager().execute(getCanvasHandler(), command), false); } }
ContainmentAcceptorControlImpl extends AbstractAcceptorControl implements ContainmentAcceptorControl<AbstractCanvasHandler> { @Override public boolean accept(final Element parent, final Node[] children) { return evaluate(parent, children, command -> getCommandManager().execute(getCanvasHandler(), command), false); } @Inject  ContainmentAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                          final CanvasHighlight canvasHighlight); }
ContainmentAcceptorControlImpl extends AbstractAcceptorControl implements ContainmentAcceptorControl<AbstractCanvasHandler> { @Override public boolean accept(final Element parent, final Node[] children) { return evaluate(parent, children, command -> getCommandManager().execute(getCanvasHandler(), command), false); } @Inject  ContainmentAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                          final CanvasHighlight canvasHighlight); @Override boolean allow(final Element parent,
                         final Node[] children); @Override boolean accept(final Element parent,
                          final Node[] children); }
ContainmentAcceptorControlImpl extends AbstractAcceptorControl implements ContainmentAcceptorControl<AbstractCanvasHandler> { @Override public boolean accept(final Element parent, final Node[] children) { return evaluate(parent, children, command -> getCommandManager().execute(getCanvasHandler(), command), false); } @Inject  ContainmentAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                          final CanvasHighlight canvasHighlight); @Override boolean allow(final Element parent,
                         final Node[] children); @Override boolean accept(final Element parent,
                          final Node[] children);  }