@Override public void showBusyIndicator( final String message ) { busyIndicatorView.showBusyIndicator( message ); }
@Override public void execute() { busyIndicatorView.hideBusyIndicator(); } }
@Test @SuppressWarnings("unchecked") public void testOnComplete() { wizard.start(); wizard.complete(); verify(busyIndicatorView, times(1)).showBusyIndicator(any(String.class)); verify(busyIndicatorView, times(1)).hideBusyIndicator(); verify(examplesService, times(1)).setupExamples(any(ExampleOrganizationalUnit.class), any(List.class)); verify(event, times(1)).fire(any(WorkspaceProjectContextChangeEvent.class)); }
@Test public void testSuccessfulCreation() { handler.create(pkg, NEW_FORM_NAME, newResourcePresenter); verify(translationService).getTranslation(FormEditorConstants.NewFormDefinitionlHandlerSelectFormUse); verify(busyIndicatorView).showBusyIndicator(anyString()); verify(busyIndicatorView).hideBusyIndicator(); verify(newResourcePresenter).complete(); verify(notificationEvent).fire(any()); verify(newResourceSuccessEvent).fire(any()); verify(placeManager).goTo(any(Path.class)); }
@Override public void showBusyIndicator(final String message) { busyIndicatorView.showBusyIndicator(message); }
@Override public void hideBusyIndicator() { busyIndicatorView.hideBusyIndicator(); }
@Test public void checkRightResourceType() throws Exception { handler.create(new Package(), "newfile.scesim", mock(NewResourcePresenter.class)); verify(busyIndicatorViewMock).showBusyIndicator("Saving"); verify(busyIndicatorViewMock).hideBusyIndicator(); verify(notificationEventMock).fire(any(NotificationEvent.class)); verify(newResourceSuccessEventMock).fire(any(NewResourcePresenter.class)); verify(placeManagerMock).goTo(any(Path.class)); }
void showBusyIndicator() { busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Renaming()); }
@Override public void execute() { busyIndicatorView.hideBusyIndicator(); } }
protected void showAssets() { if (workspaceProject.getMainModule() == null) { ensureContentSet(invalidProjectScreen.getView().getElement()); } else { busyIndicatorView.showBusyIndicator(ts.getTranslation(LibraryConstants.LoadingAssets)); libraryService.call((Boolean hasAssets) -> { final HTMLElement element = (hasAssets) ? populatedAssetsScreen.getView().getElement() : emptyAssetsScreen.getView().getElement(); ensureContentSet(element); busyIndicatorView.hideBusyIndicator(); }, new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).hasAssets(this.workspaceProject); } }
void showBusyIndicator() { busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Renaming()); }
@Override public void execute() { busyIndicatorView.hideBusyIndicator(); } }
@Override public void create(final Package pkg, final String name, final NewResourcePresenter presenter) { indicatorView.showBusyIndicator("Loading..."); final Path path = pkg.getPackageMainResourcesPath(); final Class<?> type = getDefinitionSetType(); final String setId = getId(type); final String moduleName = context.getActiveModule().isPresent() ? context.getActiveModule().get().getModuleName() : ""; createDiagram(pkg, name, presenter, path, setId, moduleName, Optional.empty()); }
@Override public void hideBusyIndicator() { busyIndicatorView.hideBusyIndicator(); }
private void onComplete(final DeploymentMode mode) { busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving()); projectService.call(getSuccessCallback(), new CommandWithThrowableDrivenErrorCallback(busyIndicatorView, errors)).newProject(context.getActiveOrganizationalUnit() .orElseThrow(() -> new IllegalStateException("Cannot call project service to create new project when no organizational unit is active.")), pomWizardPage.getPom(), mode); }
void hideBusyIndicator() { busyIndicatorView.hideBusyIndicator(); }
@Test public void testFailedCreation() { when(formEditorService.createForm(any(), anyString(), any())).thenThrow(new IllegalStateException("Something wrong happened")); handler.create(pkg, NEW_FORM_NAME, newResourcePresenter); verify(translationService).getTranslation(FormEditorConstants.NewFormDefinitionlHandlerSelectFormUse); verify(busyIndicatorView).showBusyIndicator(anyString()); verify(errorCallback).error(any(), any()); } }
void hideBusyIndicator() { busyIndicatorView.hideBusyIndicator(); }
@Test public void testNoFileSelected() { when(options.getFormFileName()).thenReturn(null); uploader.create(pkg, "file", presenter); verify(busyIndicatorView, never()).showBusyIndicator(any(String.class)); verify(options, never()).upload(any(Command.class), any(Command.class)); } }
@Override public void callback(final WorkspaceProjectContextChangeEvent context) { busyIndicatorView.hideBusyIndicator(); ExamplesWizard.super.complete(); projectContextChangeEvent.fire(context); } },