@Test public void goToSubmitChangeRequestWithoutPermissionsTest() { doReturn(promises.resolve(false)).when(this.projectController).canSubmitChangeRequest(any()); presenter.goToSubmitChangeRequest(); verify(libraryPlaces, never()).goToSubmitChangeRequestScreen(); }
public void goToSubmitChangeRequest() { projectController.canSubmitChangeRequest(workspaceProject).then(userCanSubmitChangeRequest -> { if (Boolean.TRUE.equals(userCanSubmitChangeRequest)) { this.libraryPlaces.goToSubmitChangeRequestScreen(); } return promises.resolve(); }); }
EmptyChangeRequestListPresenter { public void goToSubmitChangeRequest() { projectController.canSubmitChangeRequest(workspaceProject).then(userCanSubmitChangeRequest -> { if (Boolean.TRUE.equals(userCanSubmitChangeRequest)) { this.libraryPlaces.goToSubmitChangeRequestScreen(); } return promises.resolve(); }); } }
EmptyChangeRequestListPresenter { public void goToSubmitChangeRequest() { projectController.canSubmitChangeRequest(workspaceProject).then(userCanSubmitChangeRequest -> { if (Boolean.TRUE.equals(userCanSubmitChangeRequest)) { this.libraryPlaces.goToSubmitChangeRequestScreen(); } return promises.resolve(); }); } @Inject  EmptyChangeRequestListPresenter(final View view,
                                           final ProjectController projectController,
                                           final LibraryPlaces libraryPlaces,
                                           final Promises promises); }
EmptyChangeRequestListPresenter { public void goToSubmitChangeRequest() { projectController.canSubmitChangeRequest(workspaceProject).then(userCanSubmitChangeRequest -> { if (Boolean.TRUE.equals(userCanSubmitChangeRequest)) { this.libraryPlaces.goToSubmitChangeRequestScreen(); } return promises.resolve(); }); } @Inject  EmptyChangeRequestListPresenter(final View view,
                                           final ProjectController projectController,
                                           final LibraryPlaces libraryPlaces,
                                           final Promises promises); @PostConstruct void postConstruct(); View getView(); void goToSubmitChangeRequest(); }
EmptyChangeRequestListPresenter { public void goToSubmitChangeRequest() { projectController.canSubmitChangeRequest(workspaceProject).then(userCanSubmitChangeRequest -> { if (Boolean.TRUE.equals(userCanSubmitChangeRequest)) { this.libraryPlaces.goToSubmitChangeRequestScreen(); } return promises.resolve(); }); } @Inject  EmptyChangeRequestListPresenter(final View view,
                                           final ProjectController projectController,
                                           final LibraryPlaces libraryPlaces,
                                           final Promises promises); @PostConstruct void postConstruct(); View getView(); void goToSubmitChangeRequest();  }