@Test public void onFileNameChangedWhenUserChooseZip() { reset(view); when(view.getFileName()).thenReturn("fileName.zip"); presenter.onFileNameChanged(); verify(view).getFileName(); verify(view).setEnabledUploadButton(eq(true)); }
@Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty() && fileName.contains(".zip"); view.setEnabledUploadButton(enabled); }
UploadFolderFromZipPresenter implements UploadFolderFromZipView.ActionDelegate { @Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty() && fileName.contains(".zip"); view.setEnabledUploadButton(enabled); } }
UploadFolderFromZipPresenter implements UploadFolderFromZipView.ActionDelegate { @Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty() && fileName.contains(".zip"); view.setEnabledUploadButton(enabled); } @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 onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty() && fileName.contains(".zip"); view.setEnabledUploadButton(enabled); } @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 onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty() && fileName.contains(".zip"); view.setEnabledUploadButton(enabled); } @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();  }