Search in sources :

Example 6 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 testEditingCol.

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

Example 7 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 testSetHeader.

@Test
public void testSetHeader() {
    final ActionWrapper actionWrapper = mock(ActionWrapper.class);
    final String header = "header";
    doReturn(actionWrapper).when(plugin).editingWrapper();
    plugin.setHeader(header);
    verify(actionWrapper).setHeader(header);
    verify(plugin).fireChangeEvent(additionalInfoPage);
}
Also used : ActionWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper) Test(org.junit.Test)

Example 8 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 testSetInsertLogical.

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

Example 9 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 testNewActionWrapperWhenColumnIsAnActionSetFactWrapper.

@Test
public void testNewActionWrapperWhenColumnIsAnActionSetFactWrapper() 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(ActionSetFieldCol52.class));
    assertTrue(wrapper instanceof ActionSetFactWrapper);
}
Also used : GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) ActionSetFactWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionSetFactWrapper) ActionWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52) Test(org.junit.Test)

Example 10 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 testIsHideColumn.

@Test
public void testIsHideColumn() {
    final ActionWrapper actionWrapper = mock(ActionWrapper.class);
    doReturn(actionWrapper).when(plugin).editingWrapper();
    plugin.isHideColumn();
    verify(actionWrapper).isHideColumn();
}
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