public void calendarevent_should_care_empty_fields() { var subject = "Release party"; var description = ""; var location = string.Empty; var alldayEvent = false; var begin = new DateTime(2016, 01, 03, 12, 00, 00); var end = new DateTime(2016, 01, 03, 14, 30, 0); var encoding = PayloadGenerator.CalendarEvent.EventEncoding.Universal; var generator = new PayloadGenerator.CalendarEvent(subject, description, location, begin, end, alldayEvent, encoding); generator.ToString().ShouldBe($"BEGIN:VEVENT{Environment.NewLine}SUMMARY:Release party{Environment.NewLine}DTSTART:20160103T120000{Environment.NewLine}DTEND:20160103T143000{Environment.NewLine}END:VEVENT"); }
public void calendarevent_should_build_universal() { var subject = "Release party"; var description = "A small party for the new QRCoder. Bring some beer!"; var location = "Programmer's paradise, Beachtown, Paradise"; var alldayEvent = false; var begin = new DateTime(2016,01,03,12,00,00); var end = new DateTime(2016,01,03,14,30,0); var encoding = PayloadGenerator.CalendarEvent.EventEncoding.Universal; var generator = new PayloadGenerator.CalendarEvent(subject, description, location, begin, end, alldayEvent, encoding); generator.ToString().ShouldBe($"BEGIN:VEVENT{Environment.NewLine}SUMMARY:Release party{Environment.NewLine}DESCRIPTION:A small party for the new QRCoder. Bring some beer!{Environment.NewLine}LOCATION:Programmer's paradise, Beachtown, Paradise{Environment.NewLine}DTSTART:20160103T120000{Environment.NewLine}DTEND:20160103T143000{Environment.NewLine}END:VEVENT"); }