@Test public void testRefresh() { final GuidedDecisionTable52 guidedDecisionTable52 = mock(GuidedDecisionTable52.class); doReturn(Optional.of(guidedDecisionTable52)).when(presenter).getGuidedDecisionTable52(); doNothing().when(presenter).refreshAttributeWidget(any()); doNothing().when(presenter).refreshMetaDataWidget(any()); doNothing().when(presenter).refreshConditionsWidget(any()); doNothing().when(presenter).refreshActionsWidget(any()); final List<AttributeCol52> attributeCol52s = new ArrayList<>(); final List<MetadataCol52> metadataCol52s = new ArrayList<>(); final List<CompositeColumn<? extends BaseColumn>> compositeColumns = new ArrayList<>(); final List<ActionCol52> actionCol52s = new ArrayList<>(); doReturn(attributeCol52s).when(guidedDecisionTable52).getAttributeCols(); doReturn(metadataCol52s).when(guidedDecisionTable52).getAttributeCols(); doReturn(compositeColumns).when(guidedDecisionTable52).getAttributeCols(); doReturn(actionCol52s).when(guidedDecisionTable52).getAttributeCols(); presenter.refresh(); verify(presenter).refreshAttributeWidget(attributeCol52s); verify(presenter).refreshMetaDataWidget(metadataCol52s); verify(presenter).refreshConditionsWidget(compositeColumns); verify(presenter).refreshActionsWidget(actionCol52s); }
public void refresh() { getGuidedDecisionTable52().ifPresent(model -> { refreshAttributeWidget(model.getAttributeCols()); refreshMetaDataWidget(model.getMetadataCols()); refreshConditionsWidget(model.getConditions()); refreshActionsWidget(model.getActionCols()); }); }
ColumnsPagePresenter { public void refresh() { getGuidedDecisionTable52().ifPresent(model -> { refreshAttributeWidget(model.getAttributeCols()); refreshMetaDataWidget(model.getMetadataCols()); refreshConditionsWidget(model.getConditions()); refreshActionsWidget(model.getActionCols()); }); } }
ColumnsPagePresenter { public void refresh() { getGuidedDecisionTable52().ifPresent(model -> { refreshAttributeWidget(model.getAttributeCols()); refreshMetaDataWidget(model.getMetadataCols()); refreshConditionsWidget(model.getConditions()); refreshActionsWidget(model.getActionCols()); }); } @Inject  ColumnsPagePresenter(final View view,
                                final GuidedDecisionTableAccordion accordion,
                                final ManagedInstance<NewGuidedDecisionTableColumnWizard> wizardManagedInstance,
                                final TranslationService translationService,
                                final ManagedInstance<DeleteColumnManagementAnchorWidget> deleteColumnManagementAnchorWidgets,
                                final ManagedInstance<AttributeColumnConfigRow> attributeColumnConfigRow,
                                final ColumnManagementView conditionsPanel,
                                final ColumnManagementView actionsPanel,
                                final ShowRuleNameOptionPresenter showRuleNameOptionPresenter); }
ColumnsPagePresenter { public void refresh() { getGuidedDecisionTable52().ifPresent(model -> { refreshAttributeWidget(model.getAttributeCols()); refreshMetaDataWidget(model.getMetadataCols()); refreshConditionsWidget(model.getConditions()); refreshActionsWidget(model.getActionCols()); }); } @Inject  ColumnsPagePresenter(final View view,
                                final GuidedDecisionTableAccordion accordion,
                                final ManagedInstance<NewGuidedDecisionTableColumnWizard> wizardManagedInstance,
                                final TranslationService translationService,
                                final ManagedInstance<DeleteColumnManagementAnchorWidget> deleteColumnManagementAnchorWidgets,
                                final ManagedInstance<AttributeColumnConfigRow> attributeColumnConfigRow,
                                final ColumnManagementView conditionsPanel,
                                final ColumnManagementView actionsPanel,
                                final ShowRuleNameOptionPresenter showRuleNameOptionPresenter); @PostConstruct void setup(); View getView(); void init(final GuidedDecisionTableModellerView.Presenter modeller); void onUpdatedLockStatusEvent(final @Observes UpdatedLockStatusEvent event); void onRefreshAttributesPanelEvent(final @Observes RefreshAttributesPanelEvent event); void onRefreshMetaDataPanelEvent(final @Observes RefreshMetaDataPanelEvent event); void onRefreshConditionsPanelEvent(final @Observes RefreshConditionsPanelEvent event); void onRefreshActionsPanelEvent(final @Observes RefreshActionsPanelEvent event); GuidedDecisionTableAccordion getAccordion(); void onDecisionTableSelected(final @Observes DecisionTableSelectedEvent event); void refresh(); }
ColumnsPagePresenter { public void refresh() { getGuidedDecisionTable52().ifPresent(model -> { refreshAttributeWidget(model.getAttributeCols()); refreshMetaDataWidget(model.getMetadataCols()); refreshConditionsWidget(model.getConditions()); refreshActionsWidget(model.getActionCols()); }); } @Inject  ColumnsPagePresenter(final View view,
                                final GuidedDecisionTableAccordion accordion,
                                final ManagedInstance<NewGuidedDecisionTableColumnWizard> wizardManagedInstance,
                                final TranslationService translationService,
                                final ManagedInstance<DeleteColumnManagementAnchorWidget> deleteColumnManagementAnchorWidgets,
                                final ManagedInstance<AttributeColumnConfigRow> attributeColumnConfigRow,
                                final ColumnManagementView conditionsPanel,
                                final ColumnManagementView actionsPanel,
                                final ShowRuleNameOptionPresenter showRuleNameOptionPresenter); @PostConstruct void setup(); View getView(); void init(final GuidedDecisionTableModellerView.Presenter modeller); void onUpdatedLockStatusEvent(final @Observes UpdatedLockStatusEvent event); void onRefreshAttributesPanelEvent(final @Observes RefreshAttributesPanelEvent event); void onRefreshMetaDataPanelEvent(final @Observes RefreshMetaDataPanelEvent event); void onRefreshConditionsPanelEvent(final @Observes RefreshConditionsPanelEvent event); void onRefreshActionsPanelEvent(final @Observes RefreshActionsPanelEvent event); GuidedDecisionTableAccordion getAccordion(); void onDecisionTableSelected(final @Observes DecisionTableSelectedEvent event); void refresh();  }