Search in sources :

Example 6 with DecisionTableColumnPlugin

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

the class PluginHandlerTest method testEditWhenColumnIsInvalid.

@Test
public void testEditWhenColumnIsInvalid() {
    final ActionCol52 column = mock(ActionCol52.class);
    final DecisionTableColumnPlugin plugin = mock(DecisionTableColumnPlugin.class);
    doReturn(plugin).when(actionWorkItemSetFieldPlugin).get();
    pluginHandler.edit(column);
    verify(plugin, never()).setOriginalColumnConfig52(column);
    verify(pluginHandler, never()).openWizard(plugin);
}
Also used : ActionCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionCol52) DecisionTableColumnPlugin(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin) BaseDecisionTableColumnPlugin(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.BaseDecisionTableColumnPlugin) Test(org.junit.Test)

Example 7 with DecisionTableColumnPlugin

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

the class SummaryPageTest method pluginMock.

private DecisionTableColumnPlugin pluginMock(final String title) {
    final DecisionTableColumnPlugin mock = mock(DecisionTableColumnPlugin.class);
    when(mock.getTitle()).thenReturn(title);
    return mock;
}
Also used : DecisionTableColumnPlugin(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin) BaseDecisionTableColumnPlugin(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.BaseDecisionTableColumnPlugin)

Example 8 with DecisionTableColumnPlugin

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

the class SummaryPageTest method testOpenPageWhenTheWizardCanBeOpened.

@Test
public void testOpenPageWhenTheWizardCanBeOpened() {
    final DecisionTableColumnPlugin plugin = pluginMock("plugin");
    final String selectedItem = "page";
    doReturn(plugin).when(page).findPluginByIdentifier(selectedItem);
    doReturn(false).when(presenter).isReadOnly();
    page.openPage(selectedItem);
    verify(wizard).start(plugin);
}
Also used : DecisionTableColumnPlugin(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin) BaseDecisionTableColumnPlugin(org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.BaseDecisionTableColumnPlugin) Test(org.junit.Test)

Aggregations

DecisionTableColumnPlugin (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.DecisionTableColumnPlugin)8 BaseDecisionTableColumnPlugin (org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.BaseDecisionTableColumnPlugin)5 Test (org.junit.Test)4 NewGuidedDecisionTableColumnWizard (org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard)2 ActionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionCol52)1 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)1 ActionRetractFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionRetractFactCol52)1 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)1 ActionWorkItemCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemCol52)1 ActionWorkItemInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemInsertFactCol52)1 ActionWorkItemSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionWorkItemSetFieldCol52)1 BRLActionColumn (org.drools.workbench.models.guided.dtable.shared.model.BRLActionColumn)1