Search in sources :

Example 6 with LimitedEntryActionInsertFactCol52

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

the class ActionInsertFactWrapperTest method testCloneALimitedEntryActionInsert.

@Test
public void testCloneALimitedEntryActionInsert() throws Exception {
    doReturn(GuidedDecisionTable52.TableFormat.LIMITED_ENTRY).when(model).getTableFormat();
    final LimitedEntryActionInsertFactCol52 column = new LimitedEntryActionInsertFactCol52();
    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.setValue(new DTCellValue52("value"));
    final ActionInsertFactWrapper wrapper = new ActionInsertFactWrapper(plugin, column);
    final ActionInsertFactCol52 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(new DTCellValue52("value"), column.getValue());
    assertNotSame(column, clone);
}
Also used : ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) LimitedEntryActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryActionInsertFactCol52) LimitedEntryActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryActionInsertFactCol52) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) Test(org.junit.Test)

Aggregations

LimitedEntryActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryActionInsertFactCol52)6 DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)4 Test (org.junit.Test)4 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)3 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)3 Pattern52 (org.drools.workbench.models.guided.dtable.shared.model.Pattern52)2 MultiSelectionModel (com.google.gwt.view.client.MultiSelectionModel)1 SelectionChangeEvent (com.google.gwt.view.client.SelectionChangeEvent)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Set (java.util.Set)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 BaseSingleFieldConstraint (org.drools.workbench.models.datamodel.rule.BaseSingleFieldConstraint)1 SingleFieldConstraint (org.drools.workbench.models.datamodel.rule.SingleFieldConstraint)1 LimitedEntryActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryActionSetFieldCol52)1 LimitedEntryConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryConditionCol52)1 Label (org.gwtbootstrap3.client.ui.Label)1 RawMVELEvaluator (org.kie.soup.project.datamodel.commons.util.RawMVELEvaluator)1 ModelField (org.kie.soup.project.datamodel.oracle.ModelField)1