@Test @SuppressWarnings("unchecked") public void testGenerateSelected() { final ClientSessionCommand.Callback callback = mock(ClientSessionCommand.Callback.class); tested.execute(callback); ArgumentCaptor<String[]> idsCaptor = ArgumentCaptor.forClass(String[].class); verify(formGenerationService, times(1)).generateSelectedForms(eq(diagram), idsCaptor.capture()); final String[] ids = idsCaptor.getValue(); assertTrue(Arrays.asList(ids).contains(ID1)); assertTrue(Arrays.asList(ids).contains(ID2)); verify(acceptor, times(1)).test(eq(element1)); verify(acceptor, times(1)).test(eq(element2)); verify(callback, times(1)).onSuccess(); verify(callback, never()).onError(anyObject()); verify(translationService, never()).getValue(FormsClientConstants.FormsNoItemsSelectedForGeneration); verify(formGenerationNotifier, never()).showNotification(anyString()); }
@Override public <V> void execute(Callback<V> callback) { formGenerationManager.call(this::call); callback.onSuccess(); }
GenerateSelectedFormsSessionCommand extends AbstractClientSessionCommand<EditorSession> { @Override public <V> void execute(Callback<V> callback) { formGenerationManager.call(this::call); callback.onSuccess(); } }
GenerateSelectedFormsSessionCommand extends AbstractClientSessionCommand<EditorSession> { @Override public <V> void execute(Callback<V> callback) { formGenerationManager.call(this::call); callback.onSuccess(); } protected  GenerateSelectedFormsSessionCommand(); @Inject  GenerateSelectedFormsSessionCommand(final ClientFormGenerationManager formGenerationManager, final FormGenerationNotifier formGenerationNotifier, final ClientTranslationService translationService); }
GenerateSelectedFormsSessionCommand extends AbstractClientSessionCommand<EditorSession> { @Override public <V> void execute(Callback<V> callback) { formGenerationManager.call(this::call); callback.onSuccess(); } protected  GenerateSelectedFormsSessionCommand(); @Inject  GenerateSelectedFormsSessionCommand(final ClientFormGenerationManager formGenerationManager, final FormGenerationNotifier formGenerationNotifier, final ClientTranslationService translationService); GenerateSelectedFormsSessionCommand setElementAcceptor(final Predicate<Element> acceptor); @Override void execute(Callback<V> callback); @Override boolean accepts(final ClientSession session); }
GenerateSelectedFormsSessionCommand extends AbstractClientSessionCommand<EditorSession> { @Override public <V> void execute(Callback<V> callback) { formGenerationManager.call(this::call); callback.onSuccess(); } protected  GenerateSelectedFormsSessionCommand(); @Inject  GenerateSelectedFormsSessionCommand(final ClientFormGenerationManager formGenerationManager, final FormGenerationNotifier formGenerationNotifier, final ClientTranslationService translationService); GenerateSelectedFormsSessionCommand setElementAcceptor(final Predicate<Element> acceptor); @Override void execute(Callback<V> callback); @Override boolean accepts(final ClientSession session);  }