@Test @SuppressWarnings("unchecked") public void testAllow() { Command<AbstractCanvasHandler, CanvasViolation> command = mock(Command.class); tested.allow(command); verify(commandManager, times(1)).allow(eq(command)); verify(commandManager, never()).execute(any()); verify(commandManager, never()).undo(); verify(commandManager, never()).undo(any(), any()); }
public CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command) { return runExceptionSafeOperation(() -> getDelegate().allow(command)); }
ApplicationCommandManager implements SessionCommandManager<AbstractCanvasHandler> { public CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command) { return runExceptionSafeOperation(() -> getDelegate().allow(command)); } }
ApplicationCommandManager implements SessionCommandManager<AbstractCanvasHandler> { public CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command) { return runExceptionSafeOperation(() -> getDelegate().allow(command)); } @Inject  ApplicationCommandManager(final SessionManager sessionManager,
                                     final MouseRequestLifecycle lifecycle,
                                     final @Any ManagedInstance<RegistryAwareCommandManager> commandManagerInstances); }
ApplicationCommandManager implements SessionCommandManager<AbstractCanvasHandler> { public CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command) { return runExceptionSafeOperation(() -> getDelegate().allow(command)); } @Inject  ApplicationCommandManager(final SessionManager sessionManager,
                                     final MouseRequestLifecycle lifecycle,
                                     final @Any ManagedInstance<RegistryAwareCommandManager> commandManagerInstances); @PostConstruct void init(); @Override void start(); @Override void rollback(); @Override void complete(); CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command); CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command); CommandResult<CanvasViolation> undo(); @Override CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context,
                                                final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context,
                                                  final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context,
                                               final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); @PreDestroy void destroy(); }
ApplicationCommandManager implements SessionCommandManager<AbstractCanvasHandler> { public CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command) { return runExceptionSafeOperation(() -> getDelegate().allow(command)); } @Inject  ApplicationCommandManager(final SessionManager sessionManager,
                                     final MouseRequestLifecycle lifecycle,
                                     final @Any ManagedInstance<RegistryAwareCommandManager> commandManagerInstances); @PostConstruct void init(); @Override void start(); @Override void rollback(); @Override void complete(); CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command); CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command); CommandResult<CanvasViolation> undo(); @Override CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context,
                                                final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context,
                                                  final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context,
                                               final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); @PreDestroy void destroy();  }