Changeset View
Changeset View
Standalone View
Standalone View
resources/kolab/pimkolab/autotests/kcalconversiontest.cpp
Show All 37 Lines | 37 | for (int i = 0; i < list.size(); i++) { | |||
---|---|---|---|---|---|
38 | QCOMPARE(*list.at(i), *other.at(i)); | 38 | QCOMPARE(*list.at(i), *other.at(i)); | ||
39 | } | 39 | } | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | void compareAttendeesVectors(const KCalCore::Attendee::List &list, const KCalCore::Attendee::List &other) | 42 | void compareAttendeesVectors(const KCalCore::Attendee::List &list, const KCalCore::Attendee::List &other) | ||
43 | { | 43 | { | ||
44 | QCOMPARE(list.size(), other.size()); | 44 | QCOMPARE(list.size(), other.size()); | ||
45 | for (int i = 0; i < list.size(); i++) { | 45 | for (int i = 0; i < list.size(); i++) { | ||
46 | KCalCore::Attendee::Ptr at1 = list.at(i).constCast<KCalCore::Attendee>(); | 46 | KCalCore::Attendee at1 = list.at(i); | ||
47 | at1->setUid(QString()); | 47 | at1.setUid(QString()); | ||
48 | KCalCore::Attendee::Ptr at2 = other.at(i).constCast<KCalCore::Attendee>(); | 48 | KCalCore::Attendee at2 = other.at(i); | ||
49 | at2->setUid(QString()); | 49 | at2.setUid(QString()); | ||
50 | QCOMPARE(*at1, *at2); | 50 | QCOMPARE(at1, at2); | ||
51 | } | 51 | } | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | void KCalConversionTest::initTestCase() | 54 | void KCalConversionTest::initTestCase() | ||
55 | { | 55 | { | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | void KCalConversionTest::testDate_data() | 58 | void KCalConversionTest::testDate_data() | ||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 146 | { | |||
178 | kcal.setSummary(QStringLiteral("summary")); | 178 | kcal.setSummary(QStringLiteral("summary")); | ||
179 | kcal.setDescription(QStringLiteral("description")); | 179 | kcal.setDescription(QStringLiteral("description")); | ||
180 | kcal.setPriority(3); | 180 | kcal.setPriority(3); | ||
181 | kcal.setStatus(KCalCore::Incidence::StatusConfirmed); | 181 | kcal.setStatus(KCalCore::Incidence::StatusConfirmed); | ||
182 | kcal.setLocation(QStringLiteral("location")); | 182 | kcal.setLocation(QStringLiteral("location")); | ||
183 | kcal.setOrganizer(KCalCore::Person(QStringLiteral("organizer"), QStringLiteral("organizer@email"))); | 183 | kcal.setOrganizer(KCalCore::Person(QStringLiteral("organizer"), QStringLiteral("organizer@email"))); | ||
184 | //Url | 184 | //Url | ||
185 | kcal.setNonKDECustomProperty("X-KOLAB-URL", QStringLiteral("http://test.org")); | 185 | kcal.setNonKDECustomProperty("X-KOLAB-URL", QStringLiteral("http://test.org")); | ||
186 | KCalCore::Attendee::Ptr att(new KCalCore::Attendee(QStringLiteral("attendee"), QStringLiteral("attendee@email"), false, KCalCore::Attendee::NeedsAction, KCalCore::Attendee::ReqParticipant)); | 186 | KCalCore::Attendee att(QStringLiteral("attendee"), QStringLiteral("attendee@email"), false, KCalCore::Attendee::NeedsAction, KCalCore::Attendee::ReqParticipant); | ||
187 | att->setDelegate(QStringLiteral("mailto:delegatee<delegatee@email>")); | 187 | att.setDelegate(QStringLiteral("mailto:delegatee<delegatee@email>")); | ||
188 | att->setDelegator(QStringLiteral("mailto:delegator<delegator@email>")); | 188 | att.setDelegator(QStringLiteral("mailto:delegator<delegator@email>")); | ||
189 | kcal.addAttendee(att); | 189 | kcal.addAttendee(att); | ||
190 | kcal.addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(QStringLiteral("uri"), QStringLiteral("mimetype/mime")))); | 190 | kcal.addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(QStringLiteral("uri"), QStringLiteral("mimetype/mime")))); | ||
191 | KCalCore::Alarm::Ptr alarm = KCalCore::Alarm::Ptr(new KCalCore::Alarm(&kcal)); | 191 | KCalCore::Alarm::Ptr alarm = KCalCore::Alarm::Ptr(new KCalCore::Alarm(&kcal)); | ||
192 | KCalCore::Person::List addressees; | 192 | KCalCore::Person::List addressees; | ||
193 | addressees.append(KCalCore::Person(QStringLiteral("name"), QStringLiteral("email@email"))); | 193 | addressees.append(KCalCore::Person(QStringLiteral("name"), QStringLiteral("email@email"))); | ||
194 | alarm->setEmailAlarm(QStringLiteral("subject"), QStringLiteral("text"), addressees, QStringList()); //No support for attachments | 194 | alarm->setEmailAlarm(QStringLiteral("subject"), QStringLiteral("text"), addressees, QStringList()); //No support for attachments | ||
195 | kcal.addAlarm(alarm); | 195 | kcal.addAlarm(alarm); | ||
196 | //TODO alarms | 196 | //TODO alarms | ||
▲ Show 20 Lines • Show All 385 Lines • Show Last 20 Lines |