@Test public void testOnKeyUpNonEmptyStartValue() { when(startValueComponent.getValue()).thenReturn("123456"); when(endValueComponent.getValue()).thenReturn(""); view.onValueChanged(event); verify(presenter).disableOkButton(); verify(presenter, never()).enableOkButton(); }
void onValueChanged(final Object event) { if (StringUtils.isEmpty(startValueComponent.getValue()) || StringUtils.isEmpty(endValueComponent.getValue())) { presenter.disableOkButton(); } else { presenter.enableOkButton(); } }
DataTypeConstraintRangeView implements DataTypeConstraintRange.View { void onValueChanged(final Object event) { if (StringUtils.isEmpty(startValueComponent.getValue()) || StringUtils.isEmpty(endValueComponent.getValue())) { presenter.disableOkButton(); } else { presenter.enableOkButton(); } } }
DataTypeConstraintRangeView implements DataTypeConstraintRange.View { void onValueChanged(final Object event) { if (StringUtils.isEmpty(startValueComponent.getValue()) || StringUtils.isEmpty(endValueComponent.getValue())) { presenter.disableOkButton(); } else { presenter.enableOkButton(); } } @Inject  DataTypeConstraintRangeView(final HTMLDivElement startValueContainer,
                                       final HTMLDivElement endValueContainer,
                                       final HTMLInputElement includeStartValue,
                                       final HTMLInputElement includeEndValue,
                                       final TypedValueComponentSelector startValueComponentSelector,
                                       final TypedValueComponentSelector endValueComponentSelector); }
DataTypeConstraintRangeView implements DataTypeConstraintRange.View { void onValueChanged(final Object event) { if (StringUtils.isEmpty(startValueComponent.getValue()) || StringUtils.isEmpty(endValueComponent.getValue())) { presenter.disableOkButton(); } else { presenter.enableOkButton(); } } @Inject  DataTypeConstraintRangeView(final HTMLDivElement startValueContainer,
                                       final HTMLDivElement endValueContainer,
                                       final HTMLInputElement includeStartValue,
                                       final HTMLInputElement includeEndValue,
                                       final TypedValueComponentSelector startValueComponentSelector,
                                       final TypedValueComponentSelector endValueComponentSelector); @Override void init(final DataTypeConstraintRange presenter); @Override String getStartValue(); @Override String getEndValue(); @Override void setStartValue(final String value); @Override void setEndValue(final String value); @Override boolean getIncludeStartValue(); @Override void setIncludeStartValue(boolean includeStartValue); @Override boolean getIncludeEndValue(); @Override void setIncludeEndValue(boolean includeEndValue); @Override void setPlaceholders(final String placeholder); @Override void setComponentSelector(final String type); }
DataTypeConstraintRangeView implements DataTypeConstraintRange.View { void onValueChanged(final Object event) { if (StringUtils.isEmpty(startValueComponent.getValue()) || StringUtils.isEmpty(endValueComponent.getValue())) { presenter.disableOkButton(); } else { presenter.enableOkButton(); } } @Inject  DataTypeConstraintRangeView(final HTMLDivElement startValueContainer,
                                       final HTMLDivElement endValueContainer,
                                       final HTMLInputElement includeStartValue,
                                       final HTMLInputElement includeEndValue,
                                       final TypedValueComponentSelector startValueComponentSelector,
                                       final TypedValueComponentSelector endValueComponentSelector); @Override void init(final DataTypeConstraintRange presenter); @Override String getStartValue(); @Override String getEndValue(); @Override void setStartValue(final String value); @Override void setEndValue(final String value); @Override boolean getIncludeStartValue(); @Override void setIncludeStartValue(boolean includeStartValue); @Override boolean getIncludeEndValue(); @Override void setIncludeEndValue(boolean includeEndValue); @Override void setPlaceholders(final String placeholder); @Override void setComponentSelector(final String type);  }