@Test public void testPrev() throws Exception { LocalDate to = LocalDate.now().plusWeeks(1); RangeUnit unit = mock(RangeUnit.class); when(unit.prev()).thenReturn(true); when(unit.getTo()).thenReturn(to); mCalendarManager.setUnit(unit); boolean result = mCalendarManager.prev(); assertTrue(result); InOrder order = inOrder(unit); order.verify(unit).prev(); order.verify(unit).select(mCalendarManager.getSelectedDay()); assertEquals(to.withDayOfMonth(1), mCalendarManager.getActiveMonth()); }
public boolean prev() { boolean prev = mUnit.prev(); mUnit.select(mSelected); setActiveMonth(mUnit.getTo()); return prev; }
CalendarManager { public boolean prev() { boolean prev = mUnit.prev(); mUnit.select(mSelected); setActiveMonth(mUnit.getTo()); return prev; } }
CalendarManager { public boolean prev() { boolean prev = mUnit.prev(); mUnit.select(mSelected); setActiveMonth(mUnit.getTo()); return prev; } CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
                           @Nullable LocalDate maxDate);  CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
            @Nullable LocalDate maxDate, @Nullable Formatter formatter); }
CalendarManager { public boolean prev() { boolean prev = mUnit.prev(); mUnit.select(mSelected); setActiveMonth(mUnit.getTo()); return prev; } CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
                           @Nullable LocalDate maxDate);  CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
            @Nullable LocalDate maxDate, @Nullable Formatter formatter); boolean selectDay(@NonNull LocalDate date); @NonNull LocalDate getSelectedDay(); @NonNull String getHeaderText(); boolean hasNext(); boolean hasPrev(); boolean next(); boolean prev(); void toggleView(); @NonNull State getState(); CalendarUnit getUnits(); LocalDate getActiveMonth(); int getWeekOfMonth(); void init(@NonNull LocalDate date, @Nullable LocalDate minDate, @Nullable LocalDate maxDate); @Nullable LocalDate getMinDate(); void setMinDate(@Nullable LocalDate minDate); @Nullable LocalDate getMaxDate(); void setMaxDate(@Nullable LocalDate maxDate); @NonNull Formatter getFormatter(); }
CalendarManager { public boolean prev() { boolean prev = mUnit.prev(); mUnit.select(mSelected); setActiveMonth(mUnit.getTo()); return prev; } CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
                           @Nullable LocalDate maxDate);  CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
            @Nullable LocalDate maxDate, @Nullable Formatter formatter); boolean selectDay(@NonNull LocalDate date); @NonNull LocalDate getSelectedDay(); @NonNull String getHeaderText(); boolean hasNext(); boolean hasPrev(); boolean next(); boolean prev(); void toggleView(); @NonNull State getState(); CalendarUnit getUnits(); LocalDate getActiveMonth(); int getWeekOfMonth(); void init(@NonNull LocalDate date, @Nullable LocalDate minDate, @Nullable LocalDate maxDate); @Nullable LocalDate getMinDate(); void setMinDate(@Nullable LocalDate minDate); @Nullable LocalDate getMaxDate(); void setMaxDate(@Nullable LocalDate maxDate); @NonNull Formatter getFormatter();  }