@Test public void testOnRequestSelectionChanged_oneSelected() { final PermanentIdRequest mock = mock(PermanentIdRequest.class); when(mockSelEvent.getSelection()).thenReturn(Lists.newArrayList(mock)); prv.onSelectionChange(mockSelEvent); verify(mockSelEvent).getSelection(); verify(mockPresenter).setSelectedRequest(eq(mock)); verify(mockUpdateBtn).setEnabled(eq(true)); verify(mockMetadataBtn).setEnabled(eq(true)); verify(mockCreateDOIBtn).setEnabled(eq(true)); }
void onSelectionChange(SelectionChangedEvent<PermanentIdRequest> event) { List<PermanentIdRequest> selection = event.getSelection(); if (selection.size() > 0) { presenter.setSelectedRequest(selection.get(0)); updateBtn.setEnabled(true); metadataBtn.setEnabled(true); createDOIBtn.setEnabled(true); } else { presenter.setSelectedRequest(null); updateBtn.setEnabled(false); metadataBtn.setEnabled(false); createDOIBtn.setEnabled(false); } }
PermanentIdRequestViewImpl extends Composite implements PermanentIdRequestView { void onSelectionChange(SelectionChangedEvent<PermanentIdRequest> event) { List<PermanentIdRequest> selection = event.getSelection(); if (selection.size() > 0) { presenter.setSelectedRequest(selection.get(0)); updateBtn.setEnabled(true); metadataBtn.setEnabled(true); createDOIBtn.setEnabled(true); } else { presenter.setSelectedRequest(null); updateBtn.setEnabled(false); metadataBtn.setEnabled(false); createDOIBtn.setEnabled(false); } } }
PermanentIdRequestViewImpl extends Composite implements PermanentIdRequestView { void onSelectionChange(SelectionChangedEvent<PermanentIdRequest> event) { List<PermanentIdRequest> selection = event.getSelection(); if (selection.size() > 0) { presenter.setSelectedRequest(selection.get(0)); updateBtn.setEnabled(true); metadataBtn.setEnabled(true); createDOIBtn.setEnabled(true); } else { presenter.setSelectedRequest(null); updateBtn.setEnabled(false); metadataBtn.setEnabled(false); createDOIBtn.setEnabled(false); } } @Inject  PermanentIdRequestViewImpl(PermanentIdRequestProperties pr_props,
                               PermanentIdRequestAutoBeanFactory factory,
                               PermanentIdRequestViewAppearance appearance); }
PermanentIdRequestViewImpl extends Composite implements PermanentIdRequestView { void onSelectionChange(SelectionChangedEvent<PermanentIdRequest> event) { List<PermanentIdRequest> selection = event.getSelection(); if (selection.size() > 0) { presenter.setSelectedRequest(selection.get(0)); updateBtn.setEnabled(true); metadataBtn.setEnabled(true); createDOIBtn.setEnabled(true); } else { presenter.setSelectedRequest(null); updateBtn.setEnabled(false); metadataBtn.setEnabled(false); createDOIBtn.setEnabled(false); } } @Inject  PermanentIdRequestViewImpl(PermanentIdRequestProperties pr_props,
                               PermanentIdRequestAutoBeanFactory factory,
                               PermanentIdRequestViewAppearance appearance); @Override void mask(String loadingMask); @Override void unmask(); @Override void setPresenter(Presenter p); @Override void loadRequests(List<PermanentIdRequest> requests); @Override void update(PermanentIdRequest request); @Override void fetchMetadata(Folder selectedFolder,
                              PermanentIdRequestPresenterAppearance appearance,
                              DiskResourceServiceFacade drsvc); }
PermanentIdRequestViewImpl extends Composite implements PermanentIdRequestView { void onSelectionChange(SelectionChangedEvent<PermanentIdRequest> event) { List<PermanentIdRequest> selection = event.getSelection(); if (selection.size() > 0) { presenter.setSelectedRequest(selection.get(0)); updateBtn.setEnabled(true); metadataBtn.setEnabled(true); createDOIBtn.setEnabled(true); } else { presenter.setSelectedRequest(null); updateBtn.setEnabled(false); metadataBtn.setEnabled(false); createDOIBtn.setEnabled(false); } } @Inject  PermanentIdRequestViewImpl(PermanentIdRequestProperties pr_props,
                               PermanentIdRequestAutoBeanFactory factory,
                               PermanentIdRequestViewAppearance appearance); @Override void mask(String loadingMask); @Override void unmask(); @Override void setPresenter(Presenter p); @Override void loadRequests(List<PermanentIdRequest> requests); @Override void update(PermanentIdRequest request); @Override void fetchMetadata(Folder selectedFolder,
                              PermanentIdRequestPresenterAppearance appearance,
                              DiskResourceServiceFacade drsvc);  }