public void SchedulePrinter__Success() { var now = DateTime.Now; var schedule = new Schedule(); schedule.AddEvent(new Event() { Start = now, Title = "Test 1", Description = "Test description one" }); schedule.AddEvent(new Event() { Start = now.AddHours(2), Title = "Test 2", Description = "This is long description. Lorem ipsum and further text. Bla-bla-bla. More text.", Location = "Home" }); schedule.AddEvent(new Event() { Start = now.AddDays(1), Title = "Test 3", Description = null, Location = "Office" }); var canvas = new NotificationCanvas(520, 900, schedule); canvas.SaveCanvasToFile("image.png", ImageFormat.Png); Assert.IsNotNull(canvas.Image); }
public void AddEvent() { Schedule s = new Schedule(); //Right now, deciding to enter information with multiple parameters s.AddEvent("Hope", "CS3505", "2:15pm", "3:40pm", "M W F"); //TODO:BookMark 12/28/19 }
private Schedule LoadScheduleFromGoogleCalendar() { var schedule = new Schedule(); var calendars = googleCalendarProvider.GetCalendarList(); var events = googleCalendarProvider.GetEventsFromCalendars( new[] { calendars.First().ID }, DateTime.Now.AddDays(-1), DateTime.Now); foreach (var calendarEvent in events) { schedule.AddEvent(new Event() { Title = calendarEvent.Name, Start = calendarEvent.Start, End = calendarEvent.End, Description = calendarEvent.Description }); } return(schedule); }