@Test public void verifyViewMaskedAndUnmasked_go() { String loadingMaskMock = "mock loading mask"; when(treeStoreMock.getAll()).thenReturn(Collections.<AppCategory>emptyList()); when(appearanceMock.getAppCategoriesLoadingMask()).thenReturn(loadingMaskMock); uut.go(null); verify(viewMock).mask(eq(loadingMaskMock)); verify(appearanceMock).getAppCategoriesLoadingMask(); verify(adminAppServiceMock).getPublicAppCategories(appCatListCallbackCaptor.capture(), eq(false)); appCatListCallbackCaptor.getValue().onSuccess(Collections.<AppCategory>emptyList()); verify(viewMock).unmask(); }
@Override public void go(final HasId selectedAppCategory) { if (!treeStore.getAll().isEmpty() && selectedAppCategory != null) { AppCategory desiredCategory = treeStore.findModelWithKey(selectedAppCategory.getId()); view.getTree().getSelectionModel().select(desiredCategory, false); } else { clearAndRetrieveAppCategories(selectedAppCategory); } }
AdminAppsCategoriesPresenterImpl implements AdminCategoriesView.Presenter,
                                                         AppCategoriesView.AppCategoryHierarchyProvider { @Override public void go(final HasId selectedAppCategory) { if (!treeStore.getAll().isEmpty() && selectedAppCategory != null) { AppCategory desiredCategory = treeStore.findModelWithKey(selectedAppCategory.getId()); view.getTree().getSelectionModel().select(desiredCategory, false); } else { clearAndRetrieveAppCategories(selectedAppCategory); } } }
AdminAppsCategoriesPresenterImpl implements AdminCategoriesView.Presenter,
                                                         AppCategoriesView.AppCategoryHierarchyProvider { @Override public void go(final HasId selectedAppCategory) { if (!treeStore.getAll().isEmpty() && selectedAppCategory != null) { AppCategory desiredCategory = treeStore.findModelWithKey(selectedAppCategory.getId()); view.getTree().getSelectionModel().select(desiredCategory, false); } else { clearAndRetrieveAppCategories(selectedAppCategory); } } @Inject  AdminAppsCategoriesPresenterImpl(final AppCategoriesViewFactory viewFactory,
                                     final TreeStore<AppCategory> treeStore); }
AdminAppsCategoriesPresenterImpl implements AdminCategoriesView.Presenter,
                                                         AppCategoriesView.AppCategoryHierarchyProvider { @Override public void go(final HasId selectedAppCategory) { if (!treeStore.getAll().isEmpty() && selectedAppCategory != null) { AppCategory desiredCategory = treeStore.findModelWithKey(selectedAppCategory.getId()); view.getTree().getSelectionModel().select(desiredCategory, false); } else { clearAndRetrieveAppCategories(selectedAppCategory); } } @Inject  AdminAppsCategoriesPresenterImpl(final AppCategoriesViewFactory viewFactory,
                                     final TreeStore<AppCategory> treeStore); @Override List<String> getGroupHierarchy(AppCategory appCategory); @Override AppCategoriesView getView(); @Override void go(final HasId selectedAppCategory); @Override void onAddCategorySelected(final AddCategorySelected event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onCategorizeAppSelected(final CategorizeAppSelected event); @Override void onDeleteCategorySelected(final DeleteCategorySelected event); @Override void onMoveCategorySelected(MoveCategorySelected event); @Override void onRemove(StoreRemoveEvent<App> event); @Override void onRenameCategorySelected(final RenameCategorySelected event); }
AdminAppsCategoriesPresenterImpl implements AdminCategoriesView.Presenter,
                                                         AppCategoriesView.AppCategoryHierarchyProvider { @Override public void go(final HasId selectedAppCategory) { if (!treeStore.getAll().isEmpty() && selectedAppCategory != null) { AppCategory desiredCategory = treeStore.findModelWithKey(selectedAppCategory.getId()); view.getTree().getSelectionModel().select(desiredCategory, false); } else { clearAndRetrieveAppCategories(selectedAppCategory); } } @Inject  AdminAppsCategoriesPresenterImpl(final AppCategoriesViewFactory viewFactory,
                                     final TreeStore<AppCategory> treeStore); @Override List<String> getGroupHierarchy(AppCategory appCategory); @Override AppCategoriesView getView(); @Override void go(final HasId selectedAppCategory); @Override void onAddCategorySelected(final AddCategorySelected event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onCategorizeAppSelected(final CategorizeAppSelected event); @Override void onDeleteCategorySelected(final DeleteCategorySelected event); @Override void onMoveCategorySelected(MoveCategorySelected event); @Override void onRemove(StoreRemoveEvent<App> event); @Override void onRenameCategorySelected(final RenameCategorySelected event);  }