Search in sources :

Example 1 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 testNewPatternWrapperWhenPatternIsNotFound.

@Test
public void testNewPatternWrapperWhenPatternIsNotFound() throws Exception {
    final Set<PatternWrapper> actionWrappers = new HashSet<>();
    final ActionWrapper actionWrapper = mockActionWrapper("boundName", "factType");
    doReturn(actionWrappers).when(plugin).getPatterns();
    final PatternWrapper patternWrapper = plugin.newPatternWrapper(actionWrapper);
    assertEquals(actionWrapper.getBoundName(), patternWrapper.getBoundName());
    assertEquals(actionWrapper.getFactType(), patternWrapper.getFactType());
}
Also used : PatternWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.PatternWrapper) ActionWrapper(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 2 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 testGetHeader.

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

Example 3 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 testSetHideColumn.

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

Example 4 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 testGetValueList.

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

Example 5 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 testGenerateColumn.

@Test
public void testGenerateColumn() {
    final ActionCol52 actionCol52 = mock(ActionCol52.class);
    final ActionWrapper actionWrapper = mock(ActionWrapper.class);
    doReturn(actionCol52).when(actionWrapper).getActionCol52();
    doReturn(actionWrapper).when(plugin).editingWrapper();
    final Boolean success = plugin.generateColumn();
    assertTrue(success);
    verify(presenter).appendColumn(actionCol52);
}
Also used : ActionCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionCol52) 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