@Test public void setupTest() { final Contributor contributor = mock(Contributor.class); presenter.setup(contributor, mock(ContributorsListPresenter.class), mock(ContributorsListService.class)); verify(view).init(presenter); verify(view).setupViewMode(contributor); }
public void setup(final Contributor contributor, final ContributorsListPresenter parentPresenter, final ContributorsListService contributorsListService) { this.persistedContributor = contributor; this.parentPresenter = parentPresenter; this.contributorsListService = contributorsListService; view.init(this); view.setupViewMode(contributor); }
ContributorsListItemPresenter { public void setup(final Contributor contributor, final ContributorsListPresenter parentPresenter, final ContributorsListService contributorsListService) { this.persistedContributor = contributor; this.parentPresenter = parentPresenter; this.contributorsListService = contributorsListService; view.init(this); view.setupViewMode(contributor); } }
ContributorsListItemPresenter { public void setup(final Contributor contributor, final ContributorsListPresenter parentPresenter, final ContributorsListService contributorsListService) { this.persistedContributor = contributor; this.parentPresenter = parentPresenter; this.contributorsListService = contributorsListService; view.init(this); view.setupViewMode(contributor); } @Inject  ContributorsListItemPresenter(final View view,
                                         final LibraryPlaces libraryPlaces,
                                         final Event<NotificationEvent> notificationEvent,
                                         final Promises promises); }
ContributorsListItemPresenter { public void setup(final Contributor contributor, final ContributorsListPresenter parentPresenter, final ContributorsListService contributorsListService) { this.persistedContributor = contributor; this.parentPresenter = parentPresenter; this.contributorsListService = contributorsListService; view.init(this); view.setupViewMode(contributor); } @Inject  ContributorsListItemPresenter(final View view,
                                         final LibraryPlaces libraryPlaces,
                                         final Event<NotificationEvent> notificationEvent,
                                         final Promises promises); void setupNew(final ContributorsListPresenter parentPresenter,
                         final ContributorsListService contributorsListService); void setup(final Contributor contributor,
                      final ContributorsListPresenter parentPresenter,
                      final ContributorsListService contributorsListService); void edit(); void save(); void remove(); void cancel(); void showActions(); void hideActions(); Contributor getContributor(); List<String> getUserNames(); Promise<Boolean> canRemoveContributor(); Promise<Boolean> canEditContributors(); View getView(); }
ContributorsListItemPresenter { public void setup(final Contributor contributor, final ContributorsListPresenter parentPresenter, final ContributorsListService contributorsListService) { this.persistedContributor = contributor; this.parentPresenter = parentPresenter; this.contributorsListService = contributorsListService; view.init(this); view.setupViewMode(contributor); } @Inject  ContributorsListItemPresenter(final View view,
                                         final LibraryPlaces libraryPlaces,
                                         final Event<NotificationEvent> notificationEvent,
                                         final Promises promises); void setupNew(final ContributorsListPresenter parentPresenter,
                         final ContributorsListService contributorsListService); void setup(final Contributor contributor,
                      final ContributorsListPresenter parentPresenter,
                      final ContributorsListService contributorsListService); void edit(); void save(); void remove(); void cancel(); void showActions(); void hideActions(); Contributor getContributor(); List<String> getUserNames(); Promise<Boolean> canRemoveContributor(); Promise<Boolean> canEditContributors(); View getView();  }