use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshConditionsPanelEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenter method refreshColumnsPage.
void refreshColumnsPage() {
refreshAttributesPanelEvent.fire(new RefreshAttributesPanelEvent(this, model.getAttributeCols()));
refreshMetaDataPanelEvent.fire(new RefreshMetaDataPanelEvent(this, model.getMetadataCols()));
refreshConditionsPanelEvent.fire(new RefreshConditionsPanelEvent(this, model.getConditions()));
refreshActionsPanelEvent.fire(new RefreshActionsPanelEvent(this, model.getActionCols()));
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshConditionsPanelEvent in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testOnRefreshConditionsPanelEvent.
@Test
public void testOnRefreshConditionsPanelEvent() {
final RefreshConditionsPanelEvent event = mock(RefreshConditionsPanelEvent.class);
final GuidedDecisionTableView.Presenter eventPresenter = mock(GuidedDecisionTableView.Presenter.class);
final List<CompositeColumn<? extends BaseColumn>> columns = new ArrayList<>();
doReturn(eventPresenter).when(event).getPresenter();
doReturn(columns).when(event).getColumns();
doNothing().when(presenter).refreshConditionsWidget(any());
doNothing().when(presenter).refreshColumnsNoteInfo(any());
presenter.onRefreshConditionsPanelEvent(event);
verify(presenter).refreshConditionsWidget(columns);
verify(presenter).refreshColumnsNoteInfo(eventPresenter);
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshConditionsPanelEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterTest method appendConditionColumn.
@Test
public void appendConditionColumn() throws VetoException {
reset(modellerPresenter);
final ConditionCol52 condition = new ConditionCol52();
condition.setFactField("field");
condition.setHeader("header");
dtPresenter.appendColumn(condition);
verify(synchronizer, times(1)).appendColumn(eq(condition));
verify(refreshConditionsPanelEvent, times(1)).fire(any(RefreshConditionsPanelEvent.class));
verify(modellerPresenter, times(1)).updateLinks();
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshConditionsPanelEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterTest method appendPatternAndConditionColumn.
@Test
public void appendPatternAndConditionColumn() throws VetoException {
reset(modellerPresenter);
final Pattern52 pattern = new Pattern52();
pattern.setFactType("FactType");
final ConditionCol52 condition = new ConditionCol52();
condition.setFactField("field");
condition.setHeader("header");
dtPresenter.appendColumn(pattern, condition);
verify(synchronizer, times(1)).appendColumn(eq(pattern), eq(condition));
verify(refreshConditionsPanelEvent, times(1)).fire(any(RefreshConditionsPanelEvent.class));
verify(modellerPresenter, times(1)).updateLinks();
}
Aggregations