Menu

[r1586]: / trunk / UnitTests / OutlookAppointmentBuilder.cs  Maximize  Restore  History

Download this file

37 lines (34 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using Outlook = Microsoft.Office.Interop.Outlook;
namespace GoContactSyncMod.UnitTests
{
public class OutlookAppointmentBuilder
{
//Constants for test appointment
public static readonly string testAppointmentSubject = "AN_OUTLOOK_TEST_APPOINTMENT";
public Outlook.AppointmentItem Build()
{
return Synchronizer.CreateOutlookAppointmentItem(Synchronizer.SyncAppointmentsFolder);
}
public Outlook.AppointmentItem BuildDefault()
{
var oa = Build();
oa.Subject = testAppointmentSubject;
oa.Start = DateTime.Now;
oa.End = DateTime.Now.AddHours(1);
oa.AllDayEvent = false;
oa.ReminderSet = false;
return oa;
}
public Outlook.AppointmentItem BuildAllDay()
{
var oa = Build();
oa.Subject = testAppointmentSubject;
oa.Start = DateTime.Now;
oa.End = DateTime.Now;
oa.AllDayEvent = true;
oa.ReminderSet = false;
return oa;
}
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.