use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.DecisionTableSelectedEvent in project drools-wb by kiegroup.
the class ViewMenuBuilderTest method testViewAuditLog.
@Test
public void testViewAuditLog() {
builder.onDecisionTableSelectedEvent(new DecisionTableSelectedEvent(dtPresenter));
builder.onViewAuditLog();
verify(dtPresenter, times(1)).showAuditLog();
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.DecisionTableSelectedEvent in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testOnDecisionTableSelectedWhenEventAndActiveDecisionTableAreDifferent.
@Test
public void testOnDecisionTableSelectedWhenEventAndActiveDecisionTableAreDifferent() {
final DecisionTableSelectedEvent event = mock(DecisionTableSelectedEvent.class);
final GuidedDecisionTableView.Presenter presenterDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
final GuidedDecisionTableView.Presenter eventDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
final Optional<GuidedDecisionTableView.Presenter> presenterOptional = Optional.ofNullable(eventDecisionTable);
doReturn(true).when(presenter).hasActiveDecisionTable();
doReturn(Optional.of(presenterDecisionTable)).when(modeller).getActiveDecisionTable();
doReturn(presenterOptional).when(event).getPresenter();
doNothing().when(presenter).setupRuleSelector(any());
presenter.onDecisionTableSelected(event);
verify(presenter).setupRuleSelector(eventDecisionTable);
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.DecisionTableSelectedEvent in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testOnDecisionTableSelectedWhenPresenterDoesNotHaveActiveDecisionTable.
@Test
public void testOnDecisionTableSelectedWhenPresenterDoesNotHaveActiveDecisionTable() {
final DecisionTableSelectedEvent event = mock(DecisionTableSelectedEvent.class);
doReturn(false).when(presenter).hasActiveDecisionTable();
presenter.onDecisionTableSelected(event);
verify(presenter, never()).setupRuleSelector(any());
}
Aggregations