use of org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52 in project drools-wb by kiegroup.
the class AuditLogEntryCellHelperTest method getSafeHtml_ActionWorkItemInsert.
@Test
public void getSafeHtml_ActionWorkItemInsert() {
ActionWorkItemInsertFactCol52 originalColumn = new ActionWorkItemInsertFactCol52();
originalColumn.setParameterClassName("ParamClass1");
originalColumn.setWorkItemName("WI1");
originalColumn.setWorkItemResultParameterName("param1");
originalColumn.setBoundName("b1");
originalColumn.setFactField("field1");
originalColumn.setInsertLogical(false);
originalColumn.setHeader("action1");
originalColumn.setHideColumn(false);
ActionWorkItemInsertFactCol52 newColumn = new ActionWorkItemInsertFactCol52();
newColumn.setParameterClassName("ParamClass2");
newColumn.setWorkItemName("WI2");
newColumn.setWorkItemResultParameterName("param2");
newColumn.setBoundName("b2");
newColumn.setFactField("field2");
newColumn.setInsertLogical(true);
newColumn.setHeader("action2");
newColumn.setHideColumn(true);
List<BaseColumnFieldDiff> diffs = originalColumn.diff(newColumn);
SafeHtml result = helper.getSafeHtml(new UpdateColumnAuditLogEntry("mock user", originalColumn, newColumn, diffs));
assertEquals(getActionHeaderRepre(newColumn.getHeader()) + getDiffRepre(diffs), result.asString());
}
use of org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52 in project drools-wb by kiegroup.
the class PluginHandlerTest method testEditWhenColumnIsAnActionWorkItemInsertFactCol52.
@Test
public void testEditWhenColumnIsAnActionWorkItemInsertFactCol52() {
final ActionWorkItemInsertFactCol52 originalColumn = mock(ActionWorkItemInsertFactCol52.class);
final ActionWorkItemSetFieldPlugin plugin = spy(new ActionWorkItemSetFieldPlugin(patternPage, fieldPage, additionalInfoPage, workItemPage, event, translationService));
doReturn(wizard).when(wizardManagedInstance).get();
doReturn(plugin).when(actionWorkItemSetFieldPlugin).get();
pluginHandler.edit(originalColumn);
verify(plugin).setOriginalColumnConfig52(originalColumn);
verify(pluginHandler).openWizard(plugin);
verify(wizard).start(plugin);
}
use of org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52 in project drools-wb by kiegroup.
the class ActionWorkItemInsertWrapperTest method testClone.
@Test
public void testClone() throws Exception {
final ActionWorkItemInsertFactCol52 column = new ActionWorkItemInsertFactCol52();
column.setFactField("factField");
column.setBoundName("boundName");
column.setValueList("valueList");
column.setHeader("header");
column.setInsertLogical(false);
column.setDefaultValue(new DTCellValue52("defaultValue"));
column.setFactType("factType");
column.setHideColumn(false);
column.setType("type");
column.setParameterClassName("parameterClassName");
column.setWorkItemName("workItemName");
column.setWorkItemResultParameterName("workItemResultParameterName");
final ActionWorkItemInsertWrapper wrapper = new ActionWorkItemInsertWrapper(plugin, column);
final ActionWorkItemInsertFactCol52 clone = wrapper.getActionCol52();
assertEquals("factField", column.getFactField());
assertEquals("boundName", column.getBoundName());
assertEquals("valueList", column.getValueList());
assertEquals("header", column.getHeader());
assertEquals(false, column.isInsertLogical());
assertEquals(new DTCellValue52("defaultValue"), column.getDefaultValue());
assertEquals("factType", column.getFactType());
assertEquals(false, column.isHideColumn());
assertEquals("type", column.getType());
assertEquals("parameterClassName", column.getParameterClassName());
assertEquals("workItemName", column.getWorkItemName());
assertEquals("workItemResultParameterName", column.getWorkItemResultParameterName());
assertNotSame(column, clone);
}
use of org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52 in project drools-wb by kiegroup.
the class DecisionTableColumnViewUtilsTest method testColumnManagementGroupTitleWorkItemInsertFactEmpty.
@Test
public void testColumnManagementGroupTitleWorkItemInsertFactEmpty() throws Exception {
final ActionWorkItemInsertFactCol52 column = mock(ActionWorkItemInsertFactCol52.class);
doReturn(COLUMN_HEADER).when(column).getHeader();
assertEquals(COLUMN_HEADER, DecisionTableColumnViewUtils.getColumnManagementGroupTitle(column));
}
use of org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52 in project drools-wb by kiegroup.
the class ActionWorkItemInsertFactColumnSynchronizerTest method testAppend.
@Test
public void testAppend() throws VetoException {
final ActionWorkItemInsertFactCol52 column = new ActionWorkItemInsertFactCol52();
column.setWorkItemName(WORK_ITEM_NAME);
column.setHeader("col1");
modelSynchronizer.appendColumn(column);
assertEquals(2, model.getActionCols().size());
assertEquals(4, uiModel.getColumns().size());
assertTrue(uiModel.getColumns().get(3) instanceof BooleanUiColumn);
assertEquals(true, ((BaseMultipleDOMElementUiColumn) uiModel.getColumns().get(3)).isEditable());
}
Aggregations