@Test public void testOnShowTimeDateTimePickerWithValidDate() { Date date = new Date(); when(view.getTimeDate()).thenReturn(VALUE_1); when(view.parseFromISO(VALUE_1)).thenReturn(date); editor.onShowTimeDateTimePicker(); verify(view, times(1)).setTimeDateTimePickerValue(date); verify(view, times(1)).showTimeDate(false); }
public void onShowTimeDateTimePicker() { view.showTimeDate(false); String value = view.getTimeDate(); try { Date date = view.parseFromISO(value); view.setTimeDateTimePickerValue(date); } catch (IllegalArgumentException e) { view.setTimeDateTimePickerValue(value); } view.showTimeDateTimePicker(true); }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { public void onShowTimeDateTimePicker() { view.showTimeDate(false); String value = view.getTimeDate(); try { Date date = view.parseFromISO(value); view.setTimeDateTimePickerValue(date); } catch (IllegalArgumentException e) { view.setTimeDateTimePickerValue(value); } view.showTimeDateTimePicker(true); } }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { public void onShowTimeDateTimePicker() { view.showTimeDate(false); String value = view.getTimeDate(); try { Date date = view.parseFromISO(value); view.setTimeDateTimePickerValue(date); } catch (IllegalArgumentException e) { view.setTimeDateTimePickerValue(value); } view.showTimeDateTimePicker(true); } @Inject  TimerSettingsFieldEditorPresenter(final View view); }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { public void onShowTimeDateTimePicker() { view.showTimeDate(false); String value = view.getTimeDate(); try { Date date = view.parseFromISO(value); view.setTimeDateTimePickerValue(date); } catch (IllegalArgumentException e) { view.setTimeDateTimePickerValue(value); } view.showTimeDateTimePicker(true); } @Inject  TimerSettingsFieldEditorPresenter(final View view); @PostConstruct void init(); View getView(); void setValue(TimerSettingsValue value); @Override void setReadOnly(final boolean readOnly); void onShowTimeDateTimePicker(); void onTimeDateTimePickerChange(); void onTimeDateTimePickerHidden(); }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { public void onShowTimeDateTimePicker() { view.showTimeDate(false); String value = view.getTimeDate(); try { Date date = view.parseFromISO(value); view.setTimeDateTimePickerValue(date); } catch (IllegalArgumentException e) { view.setTimeDateTimePickerValue(value); } view.showTimeDateTimePicker(true); } @Inject  TimerSettingsFieldEditorPresenter(final View view); @PostConstruct void init(); View getView(); void setValue(TimerSettingsValue value); @Override void setReadOnly(final boolean readOnly); void onShowTimeDateTimePicker(); void onTimeDateTimePickerChange(); void onTimeDateTimePickerHidden();  }