use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class PluginHandler method openWizard.
void openWizard(final DecisionTableColumnPlugin plugin) {
if (presenter.isReadOnly()) {
return;
}
final NewGuidedDecisionTableColumnWizard wizard = wizardManagedInstance.get();
wizard.init(presenter);
wizard.start(plugin);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testOpenNewGuidedDecisionTableColumnWizardWhenColumnCreatingIsEnabled.
@Test
public void testOpenNewGuidedDecisionTableColumnWizardWhenColumnCreatingIsEnabled() {
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
final GuidedDecisionTableView.Presenter activeDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
doReturn(true).when(presenter).isColumnCreationEnabledToActiveDecisionTable();
doReturn(Optional.of(activeDecisionTable)).when(modeller).getActiveDecisionTable();
doReturn(wizard).when(wizardManagedInstance).get();
presenter.openNewGuidedDecisionTableColumnWizard();
verify(wizard).init(activeDecisionTable);
verify(wizard).start();
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class PluginHandlerTest method testOpenWizardWhenTableIsReadOnly.
@Test
public void testOpenWizardWhenTableIsReadOnly() throws Exception {
final DecisionTableColumnPlugin plugin = mock(DecisionTableColumnPlugin.class);
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(true).when(presenter).isReadOnly();
doReturn(wizard).when(wizardManagedInstance).get();
pluginHandler.openWizard(plugin);
verify(wizard, never()).init(presenter);
verify(wizard, never()).start(plugin);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class InsertMenuBuilderTest method testOpenNewGuidedDecisionTableColumnWizard.
@Test
public void testOpenNewGuidedDecisionTableColumnWizard() {
final GuidedDecisionTableModellerView.Presenter modeller = mock(GuidedDecisionTableModellerView.Presenter.class);
final GuidedDecisionTableView.Presenter activeDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(wizard).when(wizardManagedInstance).get();
doReturn(Optional.of(activeDecisionTable)).when(modeller).getActiveDecisionTable();
builder.openNewGuidedDecisionTableColumnWizard(modeller);
verify(wizard).init(activeDecisionTable);
verify(wizard).start();
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.NewGuidedDecisionTableColumnWizard in project drools-wb by kiegroup.
the class InsertMenuBuilderTest method testOnAppendColumnWhenModellerIsNotPresent.
@Test
public void testOnAppendColumnWhenModellerIsNotPresent() {
final NewGuidedDecisionTableColumnWizard wizard = mock(NewGuidedDecisionTableColumnWizard.class);
doReturn(wizard).when(wizardManagedInstance).get();
builder.setModeller(null);
builder.onAppendColumn();
verify(builder, never()).openNewGuidedDecisionTableColumnWizard(any());
}
Aggregations