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