@Test public void testOnIncreaseMinutesClick() { when(date.minutes()).thenReturn(1); doNothing().when(view).refresh(); view.onIncreaseMinutesClick(null); verify(date).minutes(2); }
@EventHandler("increase-minutes") public void onIncreaseMinutesClick(final ClickEvent event) { final int currentHours = getDate().hours(); getDate().minutes(getDate().minutes() + 1); getDate().hours(currentHours); refresh(); }
TimePickerView implements TimePicker.View { @EventHandler("increase-minutes") public void onIncreaseMinutesClick(final ClickEvent event) { final int currentHours = getDate().hours(); getDate().minutes(getDate().minutes() + 1); getDate().hours(currentHours); refresh(); } }
TimePickerView implements TimePicker.View { @EventHandler("increase-minutes") public void onIncreaseMinutesClick(final ClickEvent event) { final int currentHours = getDate().hours(); getDate().minutes(getDate().minutes() + 1); getDate().hours(currentHours); refresh(); } @Inject  TimePickerView(final HTMLAnchorElement increaseHours,
                          final HTMLAnchorElement decreaseHours,
                          final HTMLAnchorElement increaseMinutes,
                          final HTMLAnchorElement decreaseMinutes,
                          final HTMLAnchorElement increaseSeconds,
                          final HTMLAnchorElement decreaseSeconds,
                          final @Named("span") HTMLElement hours,
                          final @Named("span") HTMLElement minutes,
                          final @Named("span") HTMLElement seconds); }
TimePickerView implements TimePicker.View { @EventHandler("increase-minutes") public void onIncreaseMinutesClick(final ClickEvent event) { final int currentHours = getDate().hours(); getDate().minutes(getDate().minutes() + 1); getDate().hours(currentHours); refresh(); } @Inject  TimePickerView(final HTMLAnchorElement increaseHours,
                          final HTMLAnchorElement decreaseHours,
                          final HTMLAnchorElement increaseMinutes,
                          final HTMLAnchorElement decreaseMinutes,
                          final HTMLAnchorElement increaseSeconds,
                          final HTMLAnchorElement decreaseSeconds,
                          final @Named("span") HTMLElement hours,
                          final @Named("span") HTMLElement minutes,
                          final @Named("span") HTMLElement seconds); @Override void init(final TimePickerView presenter); @Override void setDate(final Moment moment); @EventHandler("increase-hours") void onIncreaseHoursClick(final ClickEvent event); @EventHandler("decrease-hours") void onDecreaseHoursClick(final ClickEvent event); @EventHandler("increase-minutes") void onIncreaseMinutesClick(final ClickEvent event); @EventHandler("decrease-minutes") void onDecreaseMinutesClick(final ClickEvent event); @EventHandler("increase-seconds") void onIncreaseSecondsClick(final ClickEvent event); @EventHandler("decrease-seconds") void onDecreaseSecondsClick(final ClickEvent event); void setOnDateChanged(final Consumer<Moment> onDateChanged); @Override Moment getDate(); @Override void setOnBlur(final Consumer<Event> onBlur); }
TimePickerView implements TimePicker.View { @EventHandler("increase-minutes") public void onIncreaseMinutesClick(final ClickEvent event) { final int currentHours = getDate().hours(); getDate().minutes(getDate().minutes() + 1); getDate().hours(currentHours); refresh(); } @Inject  TimePickerView(final HTMLAnchorElement increaseHours,
                          final HTMLAnchorElement decreaseHours,
                          final HTMLAnchorElement increaseMinutes,
                          final HTMLAnchorElement decreaseMinutes,
                          final HTMLAnchorElement increaseSeconds,
                          final HTMLAnchorElement decreaseSeconds,
                          final @Named("span") HTMLElement hours,
                          final @Named("span") HTMLElement minutes,
                          final @Named("span") HTMLElement seconds); @Override void init(final TimePickerView presenter); @Override void setDate(final Moment moment); @EventHandler("increase-hours") void onIncreaseHoursClick(final ClickEvent event); @EventHandler("decrease-hours") void onDecreaseHoursClick(final ClickEvent event); @EventHandler("increase-minutes") void onIncreaseMinutesClick(final ClickEvent event); @EventHandler("decrease-minutes") void onDecreaseMinutesClick(final ClickEvent event); @EventHandler("increase-seconds") void onIncreaseSecondsClick(final ClickEvent event); @EventHandler("decrease-seconds") void onDecreaseSecondsClick(final ClickEvent event); void setOnDateChanged(final Consumer<Moment> onDateChanged); @Override Moment getDate(); @Override void setOnBlur(final Consumer<Event> onBlur);  }