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