Search in sources :

Example 11 with ActionWorkItemCol52

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

the class ActionWorkItemExecuteColumnSynchronizerTest method testAppend.

@Test
public void testAppend() throws VetoException {
    final ActionWorkItemCol52 column = new ActionWorkItemCol52();
    column.setHeader("col1");
    modelSynchronizer.appendColumn(column);
    assertEquals(1, model.getActionCols().size());
    assertEquals(3, uiModel.getColumns().size());
    assertTrue(uiModel.getColumns().get(2) instanceof BooleanUiColumn);
    assertEquals(true, ((BaseMultipleDOMElementUiColumn) uiModel.getColumns().get(2)).isEditable());
}
Also used : ActionWorkItemCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52) BooleanUiColumn(org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BooleanUiColumn) Test(org.junit.Test)

Example 12 with ActionWorkItemCol52

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

the class ActionWorkItemPluginTest method testSetupDefaultValuesWhenColumnIsNotNew.

@Test
public void testSetupDefaultValuesWhenColumnIsNotNew() throws Exception {
    final ActionWorkItemCol52 column = mock(ActionWorkItemCol52.class);
    doReturn(false).when(plugin).isNewColumn();
    doReturn(column).when(plugin).clone(any());
    plugin.setupDefaultValues();
    assertEquals(column, plugin.editingCol());
    verify(plugin).fireChangeEvent(workItemPage);
    verify(plugin).fireChangeEvent(additionalInfoPage);
}
Also used : ActionWorkItemCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52) Test(org.junit.Test)

Example 13 with ActionWorkItemCol52

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

the class ActionWorkItemPluginTest method testSetupDefaultValuesWhenColumnIsNew.

@Test
public void testSetupDefaultValuesWhenColumnIsNew() throws Exception {
    final ActionWorkItemCol52 column = mock(ActionWorkItemCol52.class);
    doReturn(true).when(plugin).isNewColumn();
    doReturn(column).when(plugin).newActionWorkItemCol52();
    plugin.setupDefaultValues();
    assertEquals(column, plugin.editingCol());
    verify(plugin, never()).fireChangeEvent(workItemPage);
    verify(plugin, never()).fireChangeEvent(additionalInfoPage);
}
Also used : ActionWorkItemCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52) Test(org.junit.Test)

Example 14 with ActionWorkItemCol52

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

the class ActionWorkItemPluginTest method testSetHideColumn.

@Test
public void testSetHideColumn() {
    final boolean hideColumn = false;
    final ActionWorkItemCol52 actionCol52 = mock(ActionWorkItemCol52.class);
    doReturn(actionCol52).when(plugin).editingCol();
    plugin.setHideColumn(hideColumn);
    verify(actionCol52).setHideColumn(hideColumn);
}
Also used : ActionWorkItemCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52) Test(org.junit.Test)

Example 15 with ActionWorkItemCol52

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

the class ActionWorkItemPluginTest method testWorkItemDefinition.

@Test
public void testWorkItemDefinition() {
    final ActionWorkItemCol52 actionCol52 = mock(ActionWorkItemCol52.class);
    doReturn(actionCol52).when(plugin).editingCol();
    plugin.getWorkItemDefinition();
    verify(actionCol52).getWorkItemDefinition();
}
Also used : ActionWorkItemCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52) Test(org.junit.Test)

Aggregations

ActionWorkItemCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52)38 Test (org.junit.Test)25 PortableWorkDefinition (org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition)17 ArrayList (java.util.ArrayList)8 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)8 PortableFloatParameterDefinition (org.drools.workbench.models.datamodel.workitems.PortableFloatParameterDefinition)7 PortableStringParameterDefinition (org.drools.workbench.models.datamodel.workitems.PortableStringParameterDefinition)7 ActionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionCol52)7 DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)7 ActionExecuteWorkItem (org.drools.workbench.models.datamodel.rule.ActionExecuteWorkItem)6 RuleModel (org.drools.workbench.models.datamodel.rule.RuleModel)6 PortableBooleanParameterDefinition (org.drools.workbench.models.datamodel.workitems.PortableBooleanParameterDefinition)6 GuidedDTTemplateDataProvider (org.drools.workbench.models.guided.dtable.backend.util.GuidedDTTemplateDataProvider)6 TemplateDataProvider (org.drools.workbench.models.guided.dtable.backend.util.TemplateDataProvider)6 BaseColumnFieldDiff (org.drools.workbench.models.guided.dtable.shared.model.BaseColumnFieldDiff)6 DescriptionCol52 (org.drools.workbench.models.guided.dtable.shared.model.DescriptionCol52)6 RowNumberCol52 (org.drools.workbench.models.guided.dtable.shared.model.RowNumberCol52)6 ActionWorkItemInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52)5 ActionWorkItemSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemSetFieldCol52)5 BooleanUiColumn (org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BooleanUiColumn)5