@Test public void testOnTimeDateChange() { TimerSettingsValue value = new TimerSettingsValue(); editor.setValue(value); when(view.getTimeDate()).thenReturn(VALUE_1); editor.onTimeDateChange(); verify(changeHandler, times(1)).onValueChange(oldValueCaptor.capture(), newValueCaptor.capture()); assertEquals(value, oldValueCaptor.getValue()); value.setTimeDate(VALUE_1); assertEquals(value, newValueCaptor.getValue()); }
protected void onTimeDateChange() { TimerSettingsValue oldValue = value; value = copy(oldValue); value.setTimeDate(view.getTimeDate()); value.setTimeDuration(null); value.setTimeCycle(null); value.setTimeCycleLanguage(null); notifyChange(oldValue, value); }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { protected void onTimeDateChange() { TimerSettingsValue oldValue = value; value = copy(oldValue); value.setTimeDate(view.getTimeDate()); value.setTimeDuration(null); value.setTimeCycle(null); value.setTimeCycleLanguage(null); notifyChange(oldValue, value); } }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { protected void onTimeDateChange() { TimerSettingsValue oldValue = value; value = copy(oldValue); value.setTimeDate(view.getTimeDate()); value.setTimeDuration(null); value.setTimeCycle(null); value.setTimeCycleLanguage(null); notifyChange(oldValue, value); } @Inject  TimerSettingsFieldEditorPresenter(final View view); }
TimerSettingsFieldEditorPresenter extends FieldEditorPresenter<TimerSettingsValue> { protected void onTimeDateChange() { TimerSettingsValue oldValue = value; value = copy(oldValue); value.setTimeDate(view.getTimeDate()); value.setTimeDuration(null); value.setTimeCycle(null); value.setTimeCycleLanguage(null); notifyChange(oldValue, value); } @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> { protected void onTimeDateChange() { TimerSettingsValue oldValue = value; value = copy(oldValue); value.setTimeDate(view.getTimeDate()); value.setTimeDuration(null); value.setTimeCycle(null); value.setTimeCycleLanguage(null); notifyChange(oldValue, value); } @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();  }