@Test public void testCreateNoneOption() { final HTMLOptionElement noneOption = new HTMLOptionElement(); final String text = "text"; when(translationService.getValue(NONE_TRANSLATION_KEY)).thenReturn(text); doReturn(noneOption).when(view).getNewOption(); view.createNoneOption(); assertEquals(NONE_VALUE, noneOption.value); assertEquals(text, noneOption.text); }
HTMLOptionElement createNoneOption() { final HTMLOptionElement none = getNewOption(); none.text = translationService.getValue(NONE_TRANSLATION_KEY); none.value = NONE_VALUE; return none; }
TimeSelectorView implements TimeSelector.View { HTMLOptionElement createNoneOption() { final HTMLOptionElement none = getNewOption(); none.text = translationService.getValue(NONE_TRANSLATION_KEY); none.value = NONE_VALUE; return none; } }
TimeSelectorView implements TimeSelector.View { HTMLOptionElement createNoneOption() { final HTMLOptionElement none = getNewOption(); none.text = translationService.getValue(NONE_TRANSLATION_KEY); none.value = NONE_VALUE; return none; } @Inject  TimeSelectorView(final HTMLInputElement timeInput,
                            final TimePicker picker,
                            final TimeZoneProvider timeZoneProvider,
                            final TimeValueFormatter formatter,
                            final @Named("i") HTMLElement toggleTimeZoneIcon,
                            final HTMLButtonElement toggleTimeZoneButton,
                            final ClientTranslationService translationService,
                            final HTMLSelectElement timeZoneSelector,
                            final HTMLOptionElement typeSelectOption); }
TimeSelectorView implements TimeSelector.View { HTMLOptionElement createNoneOption() { final HTMLOptionElement none = getNewOption(); none.text = translationService.getValue(NONE_TRANSLATION_KEY); none.value = NONE_VALUE; return none; } @Inject  TimeSelectorView(final HTMLInputElement timeInput,
                            final TimePicker picker,
                            final TimeZoneProvider timeZoneProvider,
                            final TimeValueFormatter formatter,
                            final @Named("i") HTMLElement toggleTimeZoneIcon,
                            final HTMLButtonElement toggleTimeZoneButton,
                            final ClientTranslationService translationService,
                            final HTMLSelectElement timeZoneSelector,
                            final HTMLOptionElement typeSelectOption); void onSelectChange(final JQuerySelectPickerEvent event); @Override String getValue(); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override void setOnInputChangeCallback(final Consumer<Event> onValueChanged); @Override void select(); @Override void setOnInputBlurCallback(final Consumer<BlurEvent> onValueInputBlur); @EventHandler("time-input") void onTimeInputBlur(final BlurEvent blurEvent); @EventHandler("toggle-timezone-button") void onToggleTimeZoneButtonClick(final ClickEvent clickEvent); @Override boolean isChildOfView(final Object element); @Override void init(final TimeSelectorView presenter); }
TimeSelectorView implements TimeSelector.View { HTMLOptionElement createNoneOption() { final HTMLOptionElement none = getNewOption(); none.text = translationService.getValue(NONE_TRANSLATION_KEY); none.value = NONE_VALUE; return none; } @Inject  TimeSelectorView(final HTMLInputElement timeInput,
                            final TimePicker picker,
                            final TimeZoneProvider timeZoneProvider,
                            final TimeValueFormatter formatter,
                            final @Named("i") HTMLElement toggleTimeZoneIcon,
                            final HTMLButtonElement toggleTimeZoneButton,
                            final ClientTranslationService translationService,
                            final HTMLSelectElement timeZoneSelector,
                            final HTMLOptionElement typeSelectOption); void onSelectChange(final JQuerySelectPickerEvent event); @Override String getValue(); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override void setOnInputChangeCallback(final Consumer<Event> onValueChanged); @Override void select(); @Override void setOnInputBlurCallback(final Consumer<BlurEvent> onValueInputBlur); @EventHandler("time-input") void onTimeInputBlur(final BlurEvent blurEvent); @EventHandler("toggle-timezone-button") void onToggleTimeZoneButtonClick(final ClickEvent clickEvent); @Override boolean isChildOfView(final Object element); @Override void init(final TimeSelectorView presenter);  }