@Test public void userAppsCategoryReselected_onAppUpdated() { uut.USER_APPS_GROUP = "user apps group"; AppCategory userGroupMock = mock(AppCategory.class); when(userGroupMock.getName()).thenReturn(uut.USER_APPS_GROUP); when(treeStoreMock.getAll()).thenReturn(Lists.newArrayList(userGroupMock)); AppSavedEvent eventMock = mock(AppSavedEvent.class); uut.onAppSaved(eventMock); verify(selectionModelMock).deselectAll(); verify(selectionModelMock).select(eq(userGroupMock), eq(false)); }
@Override public void onAppSaved(AppSavedEvent event) { workspaceView.getTree().getSelectionModel().deselectAll(); AppCategory userAppCategory = findAppCategoryByName(USER_APPS_GROUP); workspaceView.getTree().getSelectionModel().select(userAppCategory, false); }
AppCategoriesPresenterImpl implements AppCategoriesView.Presenter,
                                                   AppCategoriesView.AppCategoryHierarchyProvider,
                                                   AppUpdatedEvent.AppUpdatedEventHandler,
                                                   AppSavedEvent.AppSavedEventHandler,
                                                   AppCategorySelectionChangedEvent.AppCategorySelectionChangedEventHandler { @Override public void onAppSaved(AppSavedEvent event) { workspaceView.getTree().getSelectionModel().deselectAll(); AppCategory userAppCategory = findAppCategoryByName(USER_APPS_GROUP); workspaceView.getTree().getSelectionModel().select(userAppCategory, false); } }
AppCategoriesPresenterImpl implements AppCategoriesView.Presenter,
                                                   AppCategoriesView.AppCategoryHierarchyProvider,
                                                   AppUpdatedEvent.AppUpdatedEventHandler,
                                                   AppSavedEvent.AppSavedEventHandler,
                                                   AppCategorySelectionChangedEvent.AppCategorySelectionChangedEventHandler { @Override public void onAppSaved(AppSavedEvent event) { workspaceView.getTree().getSelectionModel().deselectAll(); AppCategory userAppCategory = findAppCategoryByName(USER_APPS_GROUP); workspaceView.getTree().getSelectionModel().select(userAppCategory, false); } @Inject  AppCategoriesPresenterImpl(final DEProperties props,
                               final JsonUtil jsonUtil,
                               final EventBus eventBus,
                               final AppCategoriesViewFactory viewFactory); }
AppCategoriesPresenterImpl implements AppCategoriesView.Presenter,
                                                   AppCategoriesView.AppCategoryHierarchyProvider,
                                                   AppUpdatedEvent.AppUpdatedEventHandler,
                                                   AppSavedEvent.AppSavedEventHandler,
                                                   AppCategorySelectionChangedEvent.AppCategorySelectionChangedEventHandler { @Override public void onAppSaved(AppSavedEvent event) { workspaceView.getTree().getSelectionModel().deselectAll(); AppCategory userAppCategory = findAppCategoryByName(USER_APPS_GROUP); workspaceView.getTree().getSelectionModel().select(userAppCategory, false); } @Inject  AppCategoriesPresenterImpl(final DEProperties props,
                               final JsonUtil jsonUtil,
                               final EventBus eventBus,
                               final AppCategoriesViewFactory viewFactory); @Override List<String> getGroupHierarchy(AppCategory appCategory); @Override AppCategory getSelectedAppCategory(); @Override AppCategoriesView getWorkspaceView(); @Override void go(final HasId selectedAppCategory, final DETabPanel tabPanel); @Override void setViewDebugId(String baseID); @Override void onAppSaved(AppSavedEvent event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onAppUpdated(final AppUpdatedEvent event); @Override void onCopyAppSelected(CopyAppSelected event); @Override void onCopyWorkflowSelected(final CopyWorkflowSelected event); @Override HandlerRegistration addAppCategorySelectedEventHandler(AppCategorySelectionChangedEvent.AppCategorySelectionChangedEventHandler handler); @Override void onAppCategorySelectionChanged(AppCategorySelectionChangedEvent event); }
AppCategoriesPresenterImpl implements AppCategoriesView.Presenter,
                                                   AppCategoriesView.AppCategoryHierarchyProvider,
                                                   AppUpdatedEvent.AppUpdatedEventHandler,
                                                   AppSavedEvent.AppSavedEventHandler,
                                                   AppCategorySelectionChangedEvent.AppCategorySelectionChangedEventHandler { @Override public void onAppSaved(AppSavedEvent event) { workspaceView.getTree().getSelectionModel().deselectAll(); AppCategory userAppCategory = findAppCategoryByName(USER_APPS_GROUP); workspaceView.getTree().getSelectionModel().select(userAppCategory, false); } @Inject  AppCategoriesPresenterImpl(final DEProperties props,
                               final JsonUtil jsonUtil,
                               final EventBus eventBus,
                               final AppCategoriesViewFactory viewFactory); @Override List<String> getGroupHierarchy(AppCategory appCategory); @Override AppCategory getSelectedAppCategory(); @Override AppCategoriesView getWorkspaceView(); @Override void go(final HasId selectedAppCategory, final DETabPanel tabPanel); @Override void setViewDebugId(String baseID); @Override void onAppSaved(AppSavedEvent event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onAppUpdated(final AppUpdatedEvent event); @Override void onCopyAppSelected(CopyAppSelected event); @Override void onCopyWorkflowSelected(final CopyWorkflowSelected event); @Override HandlerRegistration addAppCategorySelectedEventHandler(AppCategorySelectionChangedEvent.AppCategorySelectionChangedEventHandler handler); @Override void onAppCategorySelectionChanged(AppCategorySelectionChangedEvent event);  }