@Test public void testHideColumnCheckBox() { final CheckBox expectedCheckBox = mock(CheckBox.class); final ClickHandler clickHandler = mock(ClickHandler.class); final boolean isHideColumn = true; doReturn(isHideColumn).when(metadataColumn).isHideColumn(); doReturn(expectedCheckBox).when(presenter).makeCheckBox(eq("HideThisColumn:")); doReturn(clickHandler).when(presenter).hideMetadataClickHandler(modeller, expectedCheckBox, metadataColumn); final CheckBox actualCheckBox = presenter.hideColumnCheckBox(modeller, metadataColumn); verify(expectedCheckBox).setValue(isHideColumn); verify(expectedCheckBox).addClickHandler(clickHandler); assertEquals(expectedCheckBox, actualCheckBox); }
CheckBox hideColumnCheckBox(final GuidedDecisionTableModellerView.Presenter modeller, final MetadataCol52 metaDataColumn) { final String label = GuidedDecisionTableConstants.INSTANCE.HideThisColumn() + GuidedDecisionTableConstants.COLON; final CheckBox hideColumnCheckBox = makeCheckBox(label); hideColumnCheckBox.setValue(metaDataColumn.isHideColumn()); hideColumnCheckBox.addClickHandler(hideMetadataClickHandler(modeller, hideColumnCheckBox, metaDataColumn)); return hideColumnCheckBox; }
ColumnsPagePresenter { CheckBox hideColumnCheckBox(final GuidedDecisionTableModellerView.Presenter modeller, final MetadataCol52 metaDataColumn) { final String label = GuidedDecisionTableConstants.INSTANCE.HideThisColumn() + GuidedDecisionTableConstants.COLON; final CheckBox hideColumnCheckBox = makeCheckBox(label); hideColumnCheckBox.setValue(metaDataColumn.isHideColumn()); hideColumnCheckBox.addClickHandler(hideMetadataClickHandler(modeller, hideColumnCheckBox, metaDataColumn)); return hideColumnCheckBox; } }
ColumnsPagePresenter { CheckBox hideColumnCheckBox(final GuidedDecisionTableModellerView.Presenter modeller, final MetadataCol52 metaDataColumn) { final String label = GuidedDecisionTableConstants.INSTANCE.HideThisColumn() + GuidedDecisionTableConstants.COLON; final CheckBox hideColumnCheckBox = makeCheckBox(label); hideColumnCheckBox.setValue(metaDataColumn.isHideColumn()); hideColumnCheckBox.addClickHandler(hideMetadataClickHandler(modeller, hideColumnCheckBox, metaDataColumn)); return hideColumnCheckBox; } @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 { CheckBox hideColumnCheckBox(final GuidedDecisionTableModellerView.Presenter modeller, final MetadataCol52 metaDataColumn) { final String label = GuidedDecisionTableConstants.INSTANCE.HideThisColumn() + GuidedDecisionTableConstants.COLON; final CheckBox hideColumnCheckBox = makeCheckBox(label); hideColumnCheckBox.setValue(metaDataColumn.isHideColumn()); hideColumnCheckBox.addClickHandler(hideMetadataClickHandler(modeller, hideColumnCheckBox, metaDataColumn)); return hideColumnCheckBox; } @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 { CheckBox hideColumnCheckBox(final GuidedDecisionTableModellerView.Presenter modeller, final MetadataCol52 metaDataColumn) { final String label = GuidedDecisionTableConstants.INSTANCE.HideThisColumn() + GuidedDecisionTableConstants.COLON; final CheckBox hideColumnCheckBox = makeCheckBox(label); hideColumnCheckBox.setValue(metaDataColumn.isHideColumn()); hideColumnCheckBox.addClickHandler(hideMetadataClickHandler(modeller, hideColumnCheckBox, metaDataColumn)); return hideColumnCheckBox; } @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();  }