@Test public void addEventTest() { testEventRepository.addEvent(mockEvent); verify(mockEventDao).save(mockEvent); }
public void addEvent(Event event) { backgroundHandler.post(() -> { eventDao.save(event); }); }
EventRepository { public void addEvent(Event event) { backgroundHandler.post(() -> { eventDao.save(event); }); } }
EventRepository { public void addEvent(Event event) { backgroundHandler.post(() -> { eventDao.save(event); }); } EventRepository(EventDao eventDao, RequestEncoder encoder,
                           Handler backgroundHandler); }
EventRepository { public void addEvent(Event event) { backgroundHandler.post(() -> { eventDao.save(event); }); } EventRepository(EventDao eventDao, RequestEncoder encoder,
                           Handler backgroundHandler); LiveData<PagedList<Event>> getEvents(); LiveData<PagedList<Event>> getEventsFromGroups(Set<Integer> idSet); LiveData<PagedList<Event>> getEventsFromGroup(int groupId); LiveData<Event> getEventLiveData(int eventId); Event getEvent(int eventId); void addEvent(Event event); void updateEvent(Event newEvent); void deleteEvent(int eventId); void requestAddEvent(int groupId, String name, Date start,
                                Date end, Location l); void requestDeleteEvent(int groupId, int eventId); void requestEditEvent(int eventId, int groupId, String title, Date
                                 start, Date end, Location l); void deleteAllEvents(); void requestRefresh(); }
EventRepository { public void addEvent(Event event) { backgroundHandler.post(() -> { eventDao.save(event); }); } EventRepository(EventDao eventDao, RequestEncoder encoder,
                           Handler backgroundHandler); LiveData<PagedList<Event>> getEvents(); LiveData<PagedList<Event>> getEventsFromGroups(Set<Integer> idSet); LiveData<PagedList<Event>> getEventsFromGroup(int groupId); LiveData<Event> getEventLiveData(int eventId); Event getEvent(int eventId); void addEvent(Event event); void updateEvent(Event newEvent); void deleteEvent(int eventId); void requestAddEvent(int groupId, String name, Date start,
                                Date end, Location l); void requestDeleteEvent(int groupId, int eventId); void requestEditEvent(int eventId, int groupId, String title, Date
                                 start, Date end, Location l); void deleteAllEvents(); void requestRefresh();  }