@Test public void testInit() { tested.init(canvasHandler); assertEquals(canvasHandler, tested.getCanvasHandler()); verify(highlight, times(1)).setCanvasHandler(eq(canvasHandler)); verify(wiresManager, times(1)).setConnectionAcceptor(any(IConnectionAcceptor.class)); verify(wiresManager, never()).setDockingAcceptor(any(IDockingAcceptor.class)); verify(wiresManager, never()).setContainmentAcceptor(any(IContainmentAcceptor.class)); }
@SuppressWarnings("unchecked") private static boolean eq(final Object n1, final Object n2) { if (n1 == null && n2 == null) { return true; } return null != n1 && n1.equals(n2); }
ConnectionAcceptorControlImpl extends AbstractAcceptorControl implements ConnectionAcceptorControl<AbstractCanvasHandler> { @SuppressWarnings("unchecked") private static boolean eq(final Object n1, final Object n2) { if (n1 == null && n2 == null) { return true; } return null != n1 && n1.equals(n2); } }
ConnectionAcceptorControlImpl extends AbstractAcceptorControl implements ConnectionAcceptorControl<AbstractCanvasHandler> { @SuppressWarnings("unchecked") private static boolean eq(final Object n1, final Object n2) { if (n1 == null && n2 == null) { return true; } return null != n1 && n1.equals(n2); } @Inject  ConnectionAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                         final CanvasHighlight canvasHighlight); }
ConnectionAcceptorControlImpl extends AbstractAcceptorControl implements ConnectionAcceptorControl<AbstractCanvasHandler> { @SuppressWarnings("unchecked") private static boolean eq(final Object n1, final Object n2) { if (n1 == null && n2 == null) { return true; } return null != n1 && n1.equals(n2); } @Inject  ConnectionAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                         final CanvasHighlight canvasHighlight); @Override @SuppressWarnings("unchecked") boolean allowSource(final Node source,
                               final Edge<ViewConnector<?>, Node> connector,
                               final Connection connection); @Override @SuppressWarnings("unchecked") boolean allowTarget(final Node target,
                               final Edge<ViewConnector<?>, Node> connector,
                               final Connection connection); @Override @SuppressWarnings("unchecked") boolean acceptSource(final Node source,
                                final Edge<ViewConnector<?>, Node> connector,
                                final Connection connection); @Override @SuppressWarnings("unchecked") boolean acceptTarget(final Node target,
                                final Edge<ViewConnector<?>, Node> connector,
                                final Connection connection); static Connection createConnection(final WiresConnection wiresConnection,
                                              final WiresMagnet wiresMagnet); @SuppressWarnings("unchecked") static MagnetConnection createConnection(final Element element); }
ConnectionAcceptorControlImpl extends AbstractAcceptorControl implements ConnectionAcceptorControl<AbstractCanvasHandler> { @SuppressWarnings("unchecked") private static boolean eq(final Object n1, final Object n2) { if (n1 == null && n2 == null) { return true; } return null != n1 && n1.equals(n2); } @Inject  ConnectionAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                         final CanvasHighlight canvasHighlight); @Override @SuppressWarnings("unchecked") boolean allowSource(final Node source,
                               final Edge<ViewConnector<?>, Node> connector,
                               final Connection connection); @Override @SuppressWarnings("unchecked") boolean allowTarget(final Node target,
                               final Edge<ViewConnector<?>, Node> connector,
                               final Connection connection); @Override @SuppressWarnings("unchecked") boolean acceptSource(final Node source,
                                final Edge<ViewConnector<?>, Node> connector,
                                final Connection connection); @Override @SuppressWarnings("unchecked") boolean acceptTarget(final Node target,
                                final Edge<ViewConnector<?>, Node> connector,
                                final Connection connection); static Connection createConnection(final WiresConnection wiresConnection,
                                              final WiresMagnet wiresMagnet); @SuppressWarnings("unchecked") static MagnetConnection createConnection(final Element element);  }