AbstractMultiGridView extends Composite implements MultiGridView<T, V>,
                                                                                                                                         RequiresResize { @Override public String getSortColumn() { final ColumnSortList columnSortList = getListGrid().getColumnSortList(); if (columnSortList != null && columnSortList.size() == 1) { return columnSortList.get(0).getColumn().getDataStoreName(); } else { return null; } }  void displayNotification(String text); @Override void displayBlockingError(String summary,
                                     String content); @Override void clearBlockingError(); void init(final V presenter); @Override void loadListTable(final String key,
                              final Consumer<ListTable<T>> readyCallback); void showBusyIndicator(final String message); void hideBusyIndicator(); ListTable<T> getListGrid(); abstract void initColumns(ListTable<T> extendedPagedTable); void initSelectionModel(final ListTable<T> extendedPagedTable); abstract String getEmptyTableCaption(); abstract List<String> getInitColumns(); abstract List<String> getBannedColumns(); @Inject void setUserPreferencesService(final Caller<UserPreferencesService> userPreferencesService); Column<T, String> createTextColumn(final String columnId,
                                              final Function<T, String> valueFunction); Column<T, Number> createNumberColumn(final String columnId,
                                                final Function<T, Number> valueFunction); ColumnMeta<T> initChecksColumn(final ListTable<T> extendedPagedTable); ColumnMeta<T> initActionsColumn(); List<ColumnMeta<T>> renameVariables(ListTable<T> extendedPagedTable, List<ColumnMeta<T>> columnMetas); void addDomainSpecifColumns(Set<String> columns); void removeDomainSpecifColumns(); @Override void setSaveFilterCallback(final BiConsumer<String, Consumer<String>> filterNameCallback); @Override void addActiveFilter(final ActiveFilterItem<T> filter); @Override void removeActiveFilter(final ActiveFilterItem<T> filter); @Override void removeAllActiveFilters(); @Override void onResize(); @Override String getSortColumn(); @Override Boolean isSortAscending(); static final String COL_ID_SELECT; static final String COL_ID_ACTIONS; static final int ACTIONS_COLUMN_WIDTH; static final int CHECK_COLUMN_WIDTH; static final int ERROR_COLUMN_WIDTH; }
@Test public void testGetSortColumn() { ListTable<T> listTable = mock(ListTable.class); when(getView().getListGrid()).thenReturn(listTable); final ColumnSortList columnSortList = new ColumnSortList(); columnSortList.push(getColumn("test")); when(listTable.getColumnSortList()).thenReturn(null, null, new ColumnSortList(), new ColumnSortList(), columnSortList, columnSortList); assertNull(getView().getSortColumn()); assertNull(getView().isSortAscending()); assertNull(getView().getSortColumn()); assertNull(getView().isSortAscending()); assertEquals("test", getView().getSortColumn()); assertEquals(true, getView().isSortAscending()); }