@Test public void testCreateOptionWithId() { final String optionId = "some id"; final HTMLOptionElement option = new HTMLOptionElement(); final DMNSimpleTimeZone tz = new DMNSimpleTimeZone(); tz.setId(optionId); doReturn(option).when(view).getNewOption(); view.createOptionWithId(tz); assertEquals(optionId, option.value); assertEquals(optionId, option.text); }
HTMLOptionElement createOptionWithId(final DMNSimpleTimeZone timeZone) { final String timeZoneId = timeZone.getId(); final HTMLOptionElement option = getNewOption(); option.value = timeZoneId; option.text = timeZoneId; return option; }
TimeSelectorView implements TimeSelector.View { HTMLOptionElement createOptionWithId(final DMNSimpleTimeZone timeZone) { final String timeZoneId = timeZone.getId(); final HTMLOptionElement option = getNewOption(); option.value = timeZoneId; option.text = timeZoneId; return option; } }
TimeSelectorView implements TimeSelector.View { HTMLOptionElement createOptionWithId(final DMNSimpleTimeZone timeZone) { final String timeZoneId = timeZone.getId(); final HTMLOptionElement option = getNewOption(); option.value = timeZoneId; option.text = timeZoneId; return option; } @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 createOptionWithId(final DMNSimpleTimeZone timeZone) { final String timeZoneId = timeZone.getId(); final HTMLOptionElement option = getNewOption(); option.value = timeZoneId; option.text = timeZoneId; return option; } @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 createOptionWithId(final DMNSimpleTimeZone timeZone) { final String timeZoneId = timeZone.getId(); final HTMLOptionElement option = getNewOption(); option.value = timeZoneId; option.text = timeZoneId; return option; } @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);  }