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());
}
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);
}
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);
}
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);
}
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();
}
Aggregations