@Test public void testOnHierarchySelected() { OntologiesPresenterImpl spy = spy(uut); HierarchySelectedEvent eventMock = mock(HierarchySelectedEvent.class); Ontology ontologyMock = mock(Ontology.class); when(hierarchyMock.getIri()).thenReturn("iri"); when(eventMock.getHierarchy()).thenReturn(hierarchyMock); when(eventMock.getEditedOntology()).thenReturn(ontologyMock); spy.onHierarchySelected(eventMock); verify(spy).getAppsByHierarchy(eq(editorGridViewMock), eq(hierarchyMock), eq(ontologyMock)); }
@Override public void onHierarchySelected(HierarchySelectedEvent event) { OntologyHierarchy hierarchy = event.getHierarchy(); Ontology editedOntology = event.getEditedOntology(); getAppsByHierarchy(editorGridPresenter.getView(), hierarchy, editedOntology); }
OntologiesPresenterImpl implements OntologiesView.Presenter,
                                                RefreshOntologiesEvent.RefreshOntologiesEventHandler,
                                                SelectOntologyVersionEvent.SelectOntologyVersionEventHandler,
                                                SaveOntologyHierarchyEvent.SaveOntologyHierarchyEventHandler,
                                                PublishOntologyClickEvent.PublishOntologyClickEventHandler,
                                                HierarchySelectedEvent.HierarchySelectedEventHandler,
                                                PreviewHierarchySelectedEvent.PreviewHierarchySelectedEventHandler,
                                                CategorizeButtonClickedEvent.CategorizeButtonClickedEventHandler,
                                                DeleteOntologyButtonClickedEvent.DeleteOntologyButtonClickedEventHandler,
                                                DeleteHierarchyEvent.DeleteHierarchyEventHandler,
                                                DeleteAppsSelected.DeleteAppsSelectedHandler,
                                                RefreshPreviewButtonClicked.RefreshPreviewButtonClickedHandler,
                                                AppSearchResultLoadEvent.AppSearchResultLoadEventHandler,
                                                RestoreAppButtonClicked.RestoreAppButtonClickedHandler { @Override public void onHierarchySelected(HierarchySelectedEvent event) { OntologyHierarchy hierarchy = event.getHierarchy(); Ontology editedOntology = event.getEditedOntology(); getAppsByHierarchy(editorGridPresenter.getView(), hierarchy, editedOntology); } }
OntologiesPresenterImpl implements OntologiesView.Presenter,
                                                RefreshOntologiesEvent.RefreshOntologiesEventHandler,
                                                SelectOntologyVersionEvent.SelectOntologyVersionEventHandler,
                                                SaveOntologyHierarchyEvent.SaveOntologyHierarchyEventHandler,
                                                PublishOntologyClickEvent.PublishOntologyClickEventHandler,
                                                HierarchySelectedEvent.HierarchySelectedEventHandler,
                                                PreviewHierarchySelectedEvent.PreviewHierarchySelectedEventHandler,
                                                CategorizeButtonClickedEvent.CategorizeButtonClickedEventHandler,
                                                DeleteOntologyButtonClickedEvent.DeleteOntologyButtonClickedEventHandler,
                                                DeleteHierarchyEvent.DeleteHierarchyEventHandler,
                                                DeleteAppsSelected.DeleteAppsSelectedHandler,
                                                RefreshPreviewButtonClicked.RefreshPreviewButtonClickedHandler,
                                                AppSearchResultLoadEvent.AppSearchResultLoadEventHandler,
                                                RestoreAppButtonClicked.RestoreAppButtonClickedHandler { @Override public void onHierarchySelected(HierarchySelectedEvent event) { OntologyHierarchy hierarchy = event.getHierarchy(); Ontology editedOntology = event.getEditedOntology(); getAppsByHierarchy(editorGridPresenter.getView(), hierarchy, editedOntology); } @Inject  OntologiesPresenterImpl(OntologyServiceFacade serviceFacade,
                                   AppServiceFacade appService,
                                   final TreeStore<OntologyHierarchy> editorTreeStore,
                                   final TreeStore<OntologyHierarchy> previewTreeStore,
                                   OntologiesViewFactory factory,
                                   AvuAutoBeanFactory avuFactory,
                                   OntologiesView.OntologiesViewAppearance appearance,
                                   AdminAppsGridView.Presenter previewGridPresenter,
                                   AdminAppsGridView.Presenter editorGridPresenter,
                                   AppCategorizeView categorizeView); }
OntologiesPresenterImpl implements OntologiesView.Presenter,
                                                RefreshOntologiesEvent.RefreshOntologiesEventHandler,
                                                SelectOntologyVersionEvent.SelectOntologyVersionEventHandler,
                                                SaveOntologyHierarchyEvent.SaveOntologyHierarchyEventHandler,
                                                PublishOntologyClickEvent.PublishOntologyClickEventHandler,
                                                HierarchySelectedEvent.HierarchySelectedEventHandler,
                                                PreviewHierarchySelectedEvent.PreviewHierarchySelectedEventHandler,
                                                CategorizeButtonClickedEvent.CategorizeButtonClickedEventHandler,
                                                DeleteOntologyButtonClickedEvent.DeleteOntologyButtonClickedEventHandler,
                                                DeleteHierarchyEvent.DeleteHierarchyEventHandler,
                                                DeleteAppsSelected.DeleteAppsSelectedHandler,
                                                RefreshPreviewButtonClicked.RefreshPreviewButtonClickedHandler,
                                                AppSearchResultLoadEvent.AppSearchResultLoadEventHandler,
                                                RestoreAppButtonClicked.RestoreAppButtonClickedHandler { @Override public void onHierarchySelected(HierarchySelectedEvent event) { OntologyHierarchy hierarchy = event.getHierarchy(); Ontology editedOntology = event.getEditedOntology(); getAppsByHierarchy(editorGridPresenter.getView(), hierarchy, editedOntology); } @Inject  OntologiesPresenterImpl(OntologyServiceFacade serviceFacade,
                                   AppServiceFacade appService,
                                   final TreeStore<OntologyHierarchy> editorTreeStore,
                                   final TreeStore<OntologyHierarchy> previewTreeStore,
                                   OntologiesViewFactory factory,
                                   AvuAutoBeanFactory avuFactory,
                                   OntologiesView.OntologiesViewAppearance appearance,
                                   AdminAppsGridView.Presenter previewGridPresenter,
                                   AdminAppsGridView.Presenter editorGridPresenter,
                                   AppCategorizeView categorizeView); @Override void go(HasOneWidget container); @Override OntologiesView getView(); @Override void appsDNDtoHierarchy(List<App> apps, OntologyHierarchy hierarchy); @Override void hierarchyDNDtoApp(final OntologyHierarchy hierarchy, final App targetApp); @Override void onRefreshOntologies(RefreshOntologiesEvent event); @Override void onSelectOntologyVersion(SelectOntologyVersionEvent event); @Override void onSaveOntologyHierarchy(SaveOntologyHierarchyEvent event); @Override void onCategorizeButtonClicked(CategorizeButtonClickedEvent event); @Override void onPublishOntologyClick(PublishOntologyClickEvent event); @Override void onPreviewHierarchySelected(PreviewHierarchySelectedEvent event); @Override void onHierarchySelected(HierarchySelectedEvent event); @Override OntologyHierarchy getHierarchyFromElement(Element el); @Override OntologyHierarchy getSelectedHierarchy(); @Override Ontology getSelectedOntology(); @Override void onDeleteOntologyButtonClicked(final DeleteOntologyButtonClickedEvent event); @Override void onDeleteHierarchy(final DeleteHierarchyEvent event); @Override void onDeleteAppsSelected(DeleteAppsSelected event); @Override void onRefreshPreviewButtonClicked(RefreshPreviewButtonClicked event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); void onRestoreAppButtonClicked(RestoreAppButtonClicked event); void getTrashItems(); }
OntologiesPresenterImpl implements OntologiesView.Presenter,
                                                RefreshOntologiesEvent.RefreshOntologiesEventHandler,
                                                SelectOntologyVersionEvent.SelectOntologyVersionEventHandler,
                                                SaveOntologyHierarchyEvent.SaveOntologyHierarchyEventHandler,
                                                PublishOntologyClickEvent.PublishOntologyClickEventHandler,
                                                HierarchySelectedEvent.HierarchySelectedEventHandler,
                                                PreviewHierarchySelectedEvent.PreviewHierarchySelectedEventHandler,
                                                CategorizeButtonClickedEvent.CategorizeButtonClickedEventHandler,
                                                DeleteOntologyButtonClickedEvent.DeleteOntologyButtonClickedEventHandler,
                                                DeleteHierarchyEvent.DeleteHierarchyEventHandler,
                                                DeleteAppsSelected.DeleteAppsSelectedHandler,
                                                RefreshPreviewButtonClicked.RefreshPreviewButtonClickedHandler,
                                                AppSearchResultLoadEvent.AppSearchResultLoadEventHandler,
                                                RestoreAppButtonClicked.RestoreAppButtonClickedHandler { @Override public void onHierarchySelected(HierarchySelectedEvent event) { OntologyHierarchy hierarchy = event.getHierarchy(); Ontology editedOntology = event.getEditedOntology(); getAppsByHierarchy(editorGridPresenter.getView(), hierarchy, editedOntology); } @Inject  OntologiesPresenterImpl(OntologyServiceFacade serviceFacade,
                                   AppServiceFacade appService,
                                   final TreeStore<OntologyHierarchy> editorTreeStore,
                                   final TreeStore<OntologyHierarchy> previewTreeStore,
                                   OntologiesViewFactory factory,
                                   AvuAutoBeanFactory avuFactory,
                                   OntologiesView.OntologiesViewAppearance appearance,
                                   AdminAppsGridView.Presenter previewGridPresenter,
                                   AdminAppsGridView.Presenter editorGridPresenter,
                                   AppCategorizeView categorizeView); @Override void go(HasOneWidget container); @Override OntologiesView getView(); @Override void appsDNDtoHierarchy(List<App> apps, OntologyHierarchy hierarchy); @Override void hierarchyDNDtoApp(final OntologyHierarchy hierarchy, final App targetApp); @Override void onRefreshOntologies(RefreshOntologiesEvent event); @Override void onSelectOntologyVersion(SelectOntologyVersionEvent event); @Override void onSaveOntologyHierarchy(SaveOntologyHierarchyEvent event); @Override void onCategorizeButtonClicked(CategorizeButtonClickedEvent event); @Override void onPublishOntologyClick(PublishOntologyClickEvent event); @Override void onPreviewHierarchySelected(PreviewHierarchySelectedEvent event); @Override void onHierarchySelected(HierarchySelectedEvent event); @Override OntologyHierarchy getHierarchyFromElement(Element el); @Override OntologyHierarchy getSelectedHierarchy(); @Override Ontology getSelectedOntology(); @Override void onDeleteOntologyButtonClicked(final DeleteOntologyButtonClickedEvent event); @Override void onDeleteHierarchy(final DeleteHierarchyEvent event); @Override void onDeleteAppsSelected(DeleteAppsSelected event); @Override void onRefreshPreviewButtonClicked(RefreshPreviewButtonClicked event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); void onRestoreAppButtonClicked(RestoreAppButtonClicked event); void getTrashItems();  }