@Test public void onFileNameChangedShouldBeExecuted() { when(view.getFileName()).thenReturn("fileName"); presenter.onFileNameChanged(); verify(view).getFileName(); verify(view).setEnabledUploadButton(eq(true)); }
@Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty(); view.setEnabledUploadButton(enabled); }
UploadFilePresenter implements UploadFileView.ActionDelegate { @Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty(); view.setEnabledUploadButton(enabled); } }
UploadFilePresenter implements UploadFileView.ActionDelegate { @Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty(); view.setEnabledUploadButton(enabled); } @Inject  UploadFilePresenter(UploadFileView view,
                               @Named("restContext") String restContext,
                               @Named("workspaceId") String workspaceId,
                               SelectionAgent selectionAgent,
                               EventBus eventBus,
                               NotificationManager notificationManager); }
UploadFilePresenter implements UploadFileView.ActionDelegate { @Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty(); view.setEnabledUploadButton(enabled); } @Inject  UploadFilePresenter(UploadFileView view,
                               @Named("restContext") String restContext,
                               @Named("workspaceId") String workspaceId,
                               SelectionAgent selectionAgent,
                               EventBus eventBus,
                               NotificationManager notificationManager); void showDialog(); @Override void onCancelClicked(); @Override void onSubmitComplete(String result); @Override void onUploadClicked(); @Override void onFileNameChanged(); }
UploadFilePresenter implements UploadFileView.ActionDelegate { @Override public void onFileNameChanged() { String fileName = view.getFileName(); boolean enabled = !fileName.isEmpty(); view.setEnabledUploadButton(enabled); } @Inject  UploadFilePresenter(UploadFileView view,
                               @Named("restContext") String restContext,
                               @Named("workspaceId") String workspaceId,
                               SelectionAgent selectionAgent,
                               EventBus eventBus,
                               NotificationManager notificationManager); void showDialog(); @Override void onCancelClicked(); @Override void onSubmitComplete(String result); @Override void onUploadClicked(); @Override void onFileNameChanged();  }