TravelTimePicker extends DialogFragment { public TravelTimePicker setMinDate(long minDate) { mMinDate = minDate; if (mDatePicker != null) { mDatePicker.setMinDate(minDate); } return this; }  static TravelTimePicker newInstance(); static TravelTimePicker newInstance(Variety type); @Override Dialog onCreateDialog(final Bundle savedInstanceState); void open(final android.app.FragmentManager manager, final Date date); void open(final android.app.FragmentManager manager); void open(final FragmentManager manager, final Date date); void open(final FragmentManager manager); Date getTime(); void setTime(final Date time); RouteOptions.TimeType getTimeType(); void setTimeType(final RouteOptions.TimeType type); DatePicker getDatePicker(); TimePicker getTimePicker(); TravelTimePicker setMinDate(long minDate); TravelTimePicker setMaxDate(long maxDate); long getMaxDate(); long getMinDate(); Variety getVariety(); @Override void onSaveInstanceState(Bundle outState); void setOnTimePickedListener(final OnTimePickedListener listener); static final String HOUR; static final String MINUTE; static final String YEAR; static final String MONTH; static final String DAY; static final String TYPE; static final String TAB_SELECTED; static final String MIN_DAY; static final String MAX_DAY; static final String TIME_DIALOG_OPEN; }
@Test public void testSetMinDate() { Calendar originalDate = Calendar.getInstance(); mTravelTimePicker.setMinDate(originalDate.getTimeInMillis()); mTravelTimePicker.open(getSupportFragmentManager()); Calendar minDateCalendar = Calendar.getInstance(); minDateCalendar.setTimeInMillis(mTravelTimePicker.getMinDate()); assertThat(minDateCalendar.get(Calendar.YEAR), equalTo(originalDate.get(Calendar.YEAR))); assertThat(minDateCalendar.get(Calendar.MONTH), equalTo(originalDate.get(Calendar.MONTH))); assertThat(minDateCalendar.get(Calendar.DAY_OF_MONTH), equalTo(originalDate.get(Calendar.DAY_OF_MONTH))); }