@Test public void testOperatorPlaceholderSelectedWhenNothingSelectedPreviously() { registerFakeProvider(); when(plugin.getFactField()).thenReturn("factField"); when(plugin.operatorPlaceholder()).thenReturn("please choose"); mockGetOperatorCompletionsToReturn(OperatorsOracle.STANDARD_OPERATORS); spyOperatorsDropdown(); mockListBox("please choose", "equal to"); page.operatorDropdown(widget -> { assertTrue(widget instanceof CEPOperatorsDropdown); final CEPOperatorsDropdown operatorsDropdown = (CEPOperatorsDropdown) widget; verify(operatorsDropdown.getBox()).setSelectedIndex(0); }); }
void operatorDropdown(final Consumer<IsWidget> widgetSupplier) { if (canOperatorBeSet()) { cepOperatorsDropdown(widgetSupplier); } else { emptyOperatorsDropdown(widgetSupplier); } }
OperatorPage extends BaseDecisionTableColumnPage<ConditionColumnPlugin> { void operatorDropdown(final Consumer<IsWidget> widgetSupplier) { if (canOperatorBeSet()) { cepOperatorsDropdown(widgetSupplier); } else { emptyOperatorsDropdown(widgetSupplier); } } }
OperatorPage extends BaseDecisionTableColumnPage<ConditionColumnPlugin> { void operatorDropdown(final Consumer<IsWidget> widgetSupplier) { if (canOperatorBeSet()) { cepOperatorsDropdown(widgetSupplier); } else { emptyOperatorsDropdown(widgetSupplier); } } @Inject  OperatorPage(final View view,
                        final Event<WizardPageStatusChangeEvent> changeEvent,
                        final TranslationService translationService); }
OperatorPage extends BaseDecisionTableColumnPage<ConditionColumnPlugin> { void operatorDropdown(final Consumer<IsWidget> widgetSupplier) { if (canOperatorBeSet()) { cepOperatorsDropdown(widgetSupplier); } else { emptyOperatorsDropdown(widgetSupplier); } } @Inject  OperatorPage(final View view,
                        final Event<WizardPageStatusChangeEvent> changeEvent,
                        final TranslationService translationService); @Override String getTitle(); @Override void prepareView(); @Override void isComplete(final Callback<Boolean> callback); String getOperator(); }
OperatorPage extends BaseDecisionTableColumnPage<ConditionColumnPlugin> { void operatorDropdown(final Consumer<IsWidget> widgetSupplier) { if (canOperatorBeSet()) { cepOperatorsDropdown(widgetSupplier); } else { emptyOperatorsDropdown(widgetSupplier); } } @Inject  OperatorPage(final View view,
                        final Event<WizardPageStatusChangeEvent> changeEvent,
                        final TranslationService translationService); @Override String getTitle(); @Override void prepareView(); @Override void isComplete(final Callback<Boolean> callback); String getOperator();  }