@Test public void resolveEndTime() { Calendar input = Calendar.getInstance(); Calendar expected = Calendar.getInstance(); input.clear(); expected.clear(); input.set(2018, 5, 29); expected.set(2018, 6, 1, 20, 0, 0); Map<String, Object> map = make("{endTime:{offset:{day:2}, hour:8, shift:pm}}"); resolver.resolveEndTime(map, reminder, input); assertNotNull(reminder.endTime); assertEquals(expected.getTimeInMillis(), reminder.endTime.getTime()); }
void resolveEndTime(Map<String, Object> map, ReminderImpl reminder, Calendar now){ if(!map.containsKey(Constants.KEY_END_TIME)) return; reminder.endTime = resolveTime((Map<String, Object>) map.get(Constants.KEY_END_TIME), now); }
ArgumentResolver { void resolveEndTime(Map<String, Object> map, ReminderImpl reminder, Calendar now){ if(!map.containsKey(Constants.KEY_END_TIME)) return; reminder.endTime = resolveTime((Map<String, Object>) map.get(Constants.KEY_END_TIME), now); } }
ArgumentResolver { void resolveEndTime(Map<String, Object> map, ReminderImpl reminder, Calendar now){ if(!map.containsKey(Constants.KEY_END_TIME)) return; reminder.endTime = resolveTime((Map<String, Object>) map.get(Constants.KEY_END_TIME), now); } ArgumentResolver(Context context); }
ArgumentResolver { void resolveEndTime(Map<String, Object> map, ReminderImpl reminder, Calendar now){ if(!map.containsKey(Constants.KEY_END_TIME)) return; reminder.endTime = resolveTime((Map<String, Object>) map.get(Constants.KEY_END_TIME), now); } ArgumentResolver(Context context); Reminder resolve(Map<String, Object> map, String rawText, Calendar now); }
ArgumentResolver { void resolveEndTime(Map<String, Object> map, ReminderImpl reminder, Calendar now){ if(!map.containsKey(Constants.KEY_END_TIME)) return; reminder.endTime = resolveTime((Map<String, Object>) map.get(Constants.KEY_END_TIME), now); } ArgumentResolver(Context context); Reminder resolve(Map<String, Object> map, String rawText, Calendar now);  }