@Test public void newModelFromNullIsValid() { final GoogleCalendarEventModel eventModel = GoogleCalendarEventModel.newFrom(null); assertThat(eventModel).isEqualToComparingFieldByField(new GoogleCalendarEventModel()); }
public static GoogleCalendarEventModel newFrom(final Event event) { final GoogleCalendarEventModel model = new GoogleCalendarEventModel(); if (event == null) { return model; } model.title = StringHelper.trimToNull(event.getSummary()); model.description = StringHelper.trimToNull(event.getDescription()); model.attendees = formatAtendees(event.getAttendees()); model.setStart(event.getStart()); model.setEnd(event.getEnd()); model.location = StringHelper.trimToNull(event.getLocation()); model.eventId = StringHelper.trimToNull(event.getId()); return model; }
GoogleCalendarEventModel { public static GoogleCalendarEventModel newFrom(final Event event) { final GoogleCalendarEventModel model = new GoogleCalendarEventModel(); if (event == null) { return model; } model.title = StringHelper.trimToNull(event.getSummary()); model.description = StringHelper.trimToNull(event.getDescription()); model.attendees = formatAtendees(event.getAttendees()); model.setStart(event.getStart()); model.setEnd(event.getEnd()); model.location = StringHelper.trimToNull(event.getLocation()); model.eventId = StringHelper.trimToNull(event.getId()); return model; } }
GoogleCalendarEventModel { public static GoogleCalendarEventModel newFrom(final Event event) { final GoogleCalendarEventModel model = new GoogleCalendarEventModel(); if (event == null) { return model; } model.title = StringHelper.trimToNull(event.getSummary()); model.description = StringHelper.trimToNull(event.getDescription()); model.attendees = formatAtendees(event.getAttendees()); model.setStart(event.getStart()); model.setEnd(event.getEnd()); model.location = StringHelper.trimToNull(event.getLocation()); model.eventId = StringHelper.trimToNull(event.getId()); return model; }  }
GoogleCalendarEventModel { public static GoogleCalendarEventModel newFrom(final Event event) { final GoogleCalendarEventModel model = new GoogleCalendarEventModel(); if (event == null) { return model; } model.title = StringHelper.trimToNull(event.getSummary()); model.description = StringHelper.trimToNull(event.getDescription()); model.attendees = formatAtendees(event.getAttendees()); model.setStart(event.getStart()); model.setEnd(event.getEnd()); model.location = StringHelper.trimToNull(event.getLocation()); model.eventId = StringHelper.trimToNull(event.getId()); return model; }  String getTitle(); void setTitle(String title); String getDescription(); void setDescription(String description); String getAttendees(); void setAttendees(String attendees); String getStartDate(); void setStartDate(String startDate); String getStartTime(); void setStartTime(String startTime); String getEndDate(); void setEndDate(String endDate); String getEndTime(); void setEndTime(String endTime); String getLocation(); void setLocation(String location); String getEventId(); void setEventId(String eventId); @Override String toString(); static GoogleCalendarEventModel newFrom(final Event event); }
GoogleCalendarEventModel { public static GoogleCalendarEventModel newFrom(final Event event) { final GoogleCalendarEventModel model = new GoogleCalendarEventModel(); if (event == null) { return model; } model.title = StringHelper.trimToNull(event.getSummary()); model.description = StringHelper.trimToNull(event.getDescription()); model.attendees = formatAtendees(event.getAttendees()); model.setStart(event.getStart()); model.setEnd(event.getEnd()); model.location = StringHelper.trimToNull(event.getLocation()); model.eventId = StringHelper.trimToNull(event.getId()); return model; }  String getTitle(); void setTitle(String title); String getDescription(); void setDescription(String description); String getAttendees(); void setAttendees(String attendees); String getStartDate(); void setStartDate(String startDate); String getStartTime(); void setStartTime(String startTime); String getEndDate(); void setEndDate(String endDate); String getEndTime(); void setEndTime(String endTime); String getLocation(); void setLocation(String location); String getEventId(); void setEventId(String eventId); @Override String toString(); static GoogleCalendarEventModel newFrom(final Event event);  }