@Test public void testRuleInheritanceWidget() { final FlowPanel expectedPanel = mock(FlowPanel.class); final Label label = mock(Label.class); final Widget widget = mock(Widget.class); doReturn(expectedPanel).when(presenter).makeFlowPanel(); doReturn(label).when(presenter).ruleInheritanceLabel(); doReturn(widget).when(presenter).ruleSelector(); final Widget actualPanel = presenter.ruleInheritanceWidget(); verify(expectedPanel).setStyleName(GuidedDecisionTableResources.INSTANCE.css().ruleInheritance()); verify(expectedPanel).add(label); verify(expectedPanel).add(widget); assertEquals(expectedPanel, actualPanel); }
Widget ruleInheritanceWidget() { final FlowPanel result = makeFlowPanel(); result.setStyleName(GuidedDecisionTableResources.INSTANCE.css().ruleInheritance()); result.add(ruleInheritanceLabel()); result.add(ruleSelector()); return result; }
ColumnsPagePresenter { Widget ruleInheritanceWidget() { final FlowPanel result = makeFlowPanel(); result.setStyleName(GuidedDecisionTableResources.INSTANCE.css().ruleInheritance()); result.add(ruleInheritanceLabel()); result.add(ruleSelector()); return result; } }
ColumnsPagePresenter { Widget ruleInheritanceWidget() { final FlowPanel result = makeFlowPanel(); result.setStyleName(GuidedDecisionTableResources.INSTANCE.css().ruleInheritance()); result.add(ruleInheritanceLabel()); result.add(ruleSelector()); return result; } @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 { Widget ruleInheritanceWidget() { final FlowPanel result = makeFlowPanel(); result.setStyleName(GuidedDecisionTableResources.INSTANCE.css().ruleInheritance()); result.add(ruleInheritanceLabel()); result.add(ruleSelector()); return result; } @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 { Widget ruleInheritanceWidget() { final FlowPanel result = makeFlowPanel(); result.setStyleName(GuidedDecisionTableResources.INSTANCE.css().ruleInheritance()); result.add(ruleInheritanceLabel()); result.add(ruleSelector()); return result; } @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();  }