@Test public void onSubmitCompleteWhenError() { String error = "Error"; presenter.onSubmitComplete(error); verify(view).setLoaderVisibility(eq(false)); verify(view).closeDialog(); verify(notificationManager).showError(eq(error)); verify(eventBus).fireEvent((RefreshProjectTreeEvent)anyObject()); }
@Override public void onSubmitComplete(String result) { view.setLoaderVisibility(false); eventBus.fireEvent(new RefreshProjectTreeEvent(getParent())); if (result != null && !result.isEmpty()) { view.closeDialog(); notificationManager.showError(parseMessage(result)); return; } if (view.isOverwriteFileSelected()) { updateOpenedEditors(); } view.closeDialog(); }
UploadFolderFromZipPresenter implements UploadFolderFromZipView.ActionDelegate { @Override public void onSubmitComplete(String result) { view.setLoaderVisibility(false); eventBus.fireEvent(new RefreshProjectTreeEvent(getParent())); if (result != null && !result.isEmpty()) { view.closeDialog(); notificationManager.showError(parseMessage(result)); return; } if (view.isOverwriteFileSelected()) { updateOpenedEditors(); } view.closeDialog(); } }
UploadFolderFromZipPresenter implements UploadFolderFromZipView.ActionDelegate { @Override public void onSubmitComplete(String result) { view.setLoaderVisibility(false); eventBus.fireEvent(new RefreshProjectTreeEvent(getParent())); if (result != null && !result.isEmpty()) { view.closeDialog(); notificationManager.showError(parseMessage(result)); return; } if (view.isOverwriteFileSelected()) { updateOpenedEditors(); } view.closeDialog(); } @Inject  UploadFolderFromZipPresenter(UploadFolderFromZipView view,
                                        @Named("restContext") String restContext,
                                        @Named("workspaceId") String workspaceId,
                                        SelectionAgent selectionAgent,
                                        EditorAgent editorAgent,
                                        EventBus eventBus,
                                        NotificationManager notificationManager); }
UploadFolderFromZipPresenter implements UploadFolderFromZipView.ActionDelegate { @Override public void onSubmitComplete(String result) { view.setLoaderVisibility(false); eventBus.fireEvent(new RefreshProjectTreeEvent(getParent())); if (result != null && !result.isEmpty()) { view.closeDialog(); notificationManager.showError(parseMessage(result)); return; } if (view.isOverwriteFileSelected()) { updateOpenedEditors(); } view.closeDialog(); } @Inject  UploadFolderFromZipPresenter(UploadFolderFromZipView view,
                                        @Named("restContext") String restContext,
                                        @Named("workspaceId") String workspaceId,
                                        SelectionAgent selectionAgent,
                                        EditorAgent editorAgent,
                                        EventBus eventBus,
                                        NotificationManager notificationManager); void showDialog(); @Override void onCancelClicked(); @Override void onSubmitComplete(String result); @Override void onUploadClicked(); @Override void onFileNameChanged(); }
UploadFolderFromZipPresenter implements UploadFolderFromZipView.ActionDelegate { @Override public void onSubmitComplete(String result) { view.setLoaderVisibility(false); eventBus.fireEvent(new RefreshProjectTreeEvent(getParent())); if (result != null && !result.isEmpty()) { view.closeDialog(); notificationManager.showError(parseMessage(result)); return; } if (view.isOverwriteFileSelected()) { updateOpenedEditors(); } view.closeDialog(); } @Inject  UploadFolderFromZipPresenter(UploadFolderFromZipView view,
                                        @Named("restContext") String restContext,
                                        @Named("workspaceId") String workspaceId,
                                        SelectionAgent selectionAgent,
                                        EditorAgent editorAgent,
                                        EventBus eventBus,
                                        NotificationManager notificationManager); void showDialog(); @Override void onCancelClicked(); @Override void onSubmitComplete(String result); @Override void onUploadClicked(); @Override void onFileNameChanged();  }