Search in sources :

Example 11 with LimitedEntryBRLConditionColumn

use of org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryBRLConditionColumn in project drools-wb by kiegroup.

the class LimitedEntryBRLConditionColumnSynchronizerTest method testUpdate.

@Test
public void testUpdate() throws VetoException {
    final LimitedEntryBRLConditionColumn column = new LimitedEntryBRLConditionColumn();
    column.setHeader("col1");
    modelSynchronizer.appendColumn(column);
    final LimitedEntryBRLConditionColumn edited = new LimitedEntryBRLConditionColumn();
    edited.setHideColumn(true);
    edited.setHeader("updated");
    modelSynchronizer.updateColumn(column, edited);
    assertEquals(1, model.getConditions().size());
    assertEquals(3, uiModel.getColumns().size());
    assertTrue(uiModel.getColumns().get(2) instanceof BooleanUiColumn);
    assertEquals("updated", uiModel.getColumns().get(2).getHeaderMetaData().get(0).getTitle());
    assertEquals(false, uiModel.getColumns().get(2).isVisible());
}
Also used : LimitedEntryBRLConditionColumn(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryBRLConditionColumn) BooleanUiColumn(org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BooleanUiColumn) Test(org.junit.Test)

Aggregations

LimitedEntryBRLConditionColumn (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryBRLConditionColumn)11 Test (org.junit.Test)5 BRLConditionColumn (org.drools.workbench.models.guided.dtable.shared.model.BRLConditionColumn)2 BooleanUiColumn (org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BooleanUiColumn)2 ArrayList (java.util.ArrayList)1 IPattern (org.drools.workbench.models.datamodel.rule.IPattern)1 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)1 BaseColumnFieldDiff (org.drools.workbench.models.guided.dtable.shared.model.BaseColumnFieldDiff)1 CompositeColumn (org.drools.workbench.models.guided.dtable.shared.model.CompositeColumn)1