Search in sources :

Example 16 with ActionWrapper

use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.

the class ActionSetFactPluginTest method testNewActionWrapperWhenColumnIsAnActionInsertFactCol52.

@Test
public void testNewActionWrapperWhenColumnIsAnActionInsertFactCol52() throws Exception {
    final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class);
    when(model.getTableFormat()).thenReturn(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY);
    when(presenter.getModel()).thenReturn(model);
    final ActionWrapper wrapper = plugin.newActionWrapper(mock(ActionInsertFactCol52.class));
    assertTrue(wrapper instanceof ActionInsertFactWrapper);
}
Also used : GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) ActionWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper) ActionInsertFactWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionInsertFactWrapper) Test(org.junit.Test)

Example 17 with ActionWrapper

use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.

the class ActionSetFactPluginTest method testSetUpdate.

@Test
public void testSetUpdate() {
    final ActionWrapper actionWrapper = mock(ActionWrapper.class);
    final boolean update = false;
    doReturn(actionWrapper).when(plugin).editingWrapper();
    plugin.setUpdate(update);
    verify(actionWrapper).setUpdate(update);
}
Also used : ActionWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper) Test(org.junit.Test)

Aggregations

ActionWrapper (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper)17 Test (org.junit.Test)16 PatternWrapper (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.PatternWrapper)3 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)2 HashSet (java.util.HashSet)1 ActionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionCol52)1 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)1 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)1 DTColumnConfig52 (org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)1 ActionInsertFactWrapper (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionInsertFactWrapper)1 ActionSetFactWrapper (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionSetFactWrapper)1