@Test public void testRemoveColumnMetaFromExtendedPagedTableForAddDomainSpecifColumns() { GridGlobalPreferences gridPreferences = new GridGlobalPreferences("test", view.getInitColumns(), view.getBannedColumns()); ListTable<TaskSummary> extendedPagedTable = new ListTable<TaskSummary>(gridPreferences); when(view.getListGrid()).thenReturn(extendedPagedTable); Column<TaskSummary, String> column = view.createTextColumn("Extra", taskSummary -> taskSummary.getName()); ColumnMeta<TaskSummary> columnMeta = new ColumnMeta<TaskSummary>(column, "Extra", true, true); Set<String> set = Collections.singleton("Extra_test"); view.initColumns(extendedPagedTable); assertThat(extendedPagedTable.getColumnMetaList().size()).isEqualTo(18); extendedPagedTable.addColumns(Collections.singletonList(columnMeta)); assertThat(extendedPagedTable.getColumnMetaList().stream()).extracting(c -> c.getCaption()).hasSize(19).containsOnlyOnce("Extra"); view.addDomainSpecifColumns(set); assertThat(extendedPagedTable.getColumnMetaList().stream()).extracting(c -> c.getCaption()).hasSize(19).doesNotContain("Extra"); assertThat(set.size()).isEqualTo(1); }
@Override public List<String> getInitColumns() { return Arrays.asList(COL_ID_SELECT, COLUMN_NAME, COLUMN_PROCESS_ID, COLUMN_STATUS, COLUMN_CREATED_ON, COL_ID_ACTIONS); }
TaskListViewImpl extends AbstractTaskListView<TaskListPresenter> { @Override public List<String> getInitColumns() { return Arrays.asList(COL_ID_SELECT, COLUMN_NAME, COLUMN_PROCESS_ID, COLUMN_STATUS, COLUMN_CREATED_ON, COL_ID_ACTIONS); } }
TaskListViewImpl extends AbstractTaskListView<TaskListPresenter> { @Override public List<String> getInitColumns() { return Arrays.asList(COL_ID_SELECT, COLUMN_NAME, COLUMN_PROCESS_ID, COLUMN_STATUS, COLUMN_CREATED_ON, COL_ID_ACTIONS); }  }
TaskListViewImpl extends AbstractTaskListView<TaskListPresenter> { @Override public List<String> getInitColumns() { return Arrays.asList(COL_ID_SELECT, COLUMN_NAME, COLUMN_PROCESS_ID, COLUMN_STATUS, COLUMN_CREATED_ON, COL_ID_ACTIONS); }  @Override List<String> getInitColumns(); }
TaskListViewImpl extends AbstractTaskListView<TaskListPresenter> { @Override public List<String> getInitColumns() { return Arrays.asList(COL_ID_SELECT, COLUMN_NAME, COLUMN_PROCESS_ID, COLUMN_STATUS, COLUMN_CREATED_ON, COL_ID_ACTIONS); }  @Override List<String> getInitColumns();  }