|
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name of test harness: T_IMCM02B1 |
|
15 // Component: IMCM |
|
16 // Owner: KP |
|
17 // Brief description of test harness: |
|
18 // Tests CImEmailOperation - reply to plaintext message including/excluding |
|
19 // attachments; reply to plaintext message as HTML including/excluding |
|
20 // attachments; reply to HTML message including/excluding attachments; reply |
|
21 // to HTML message without text alternative including/excluding attachments; |
|
22 // Also tests adding VCard and signature from the SMTP settings. |
|
23 // Detailed description of test harness: |
|
24 // As above |
|
25 // Input files required to run test harness: |
|
26 // \MSG\IMCMTSRC\contacts.cdb <DRIVE>:\system\data\contacts.cdb |
|
27 // \MSG\IMCMTSRC\T_IMCM02B1_Entry_Structure.txt <DRIVE>:\msgtest\IMCM\T_IMCM02B1_Entry_Structure.txt |
|
28 // \MSG\IMCMTSRC\rfc82201.txt <DRIVE>:\msgtest\IMCM\rfc82201.txt |
|
29 // \MSG\IMCMTSRC\rfc82202.txt <DRIVE>:\msgtest\IMCM\rfc82202.txt |
|
30 // \MSG\IMCMTSRC\rfc82203.txt <DRIVE>:\msgtest\IMCM\rfc82203.txt |
|
31 // \MSG\IMCMTSRC\rfc82204.txt <DRIVE>:\msgtest\IMCM\rfc82204.txt |
|
32 // \MSG\IMCMTSRC\rfc82205.txt <DRIVE>:\msgtest\IMCM\rfc82205.txt |
|
33 // \MSG\IMCMTSRC\rfc82206.txt <DRIVE>:\msgtest\IMCM\rfc82206.txt |
|
34 // Intermediate files produced while running test harness: |
|
35 // <DRIVE>:\msglogs\T_IMCM02B1\Entry_Structure.txt |
|
36 // Output files produced by running test harness: |
|
37 // <DRIVE>:\msglogs\T_IMCM02B1.<PLATFORM>.<VARIANT>.LOG.txt |
|
38 // Description of how to build test harness: |
|
39 // cd \msg\imcm\ |
|
40 // bldmake bldfiles |
|
41 // abld test build |
|
42 // Description of how to run test harness: |
|
43 // The following instructions are the same for all platforms: |
|
44 // 1. Build T_DB test harness from COMMDB component: |
|
45 // cd \commdb\group |
|
46 // bldmake bldfiles |
|
47 // abld test build t_db |
|
48 // 2. Build the test utilities: |
|
49 // cd \msg\testutils\group\ |
|
50 // bldmake bldfiles |
|
51 // abld build |
|
52 // WINS running instructions: |
|
53 // 1. \epoc32\release\wins\<VARIANT>\T_IMCM02B1.exe can be used at the command prompt |
|
54 // or executable can be run from Windows Explorer. |
|
55 // All other platform running instructions: |
|
56 // 1. Copy \epoc32\release\<PLATFORM>\<VARIANT>\T_IMCM02B1.exe onto the other platform |
|
57 // 2. Copy \epoc32\release\<PLATFORM>\<VARIANT>\MSVTESTUTILS.DLL into |
|
58 // <DRIVE>:\system\libs on the other platform |
|
59 // 3. Copy \epoc32\release\<PLATFORM>\<VARIANT>\EMAILTESTUTILS.DLL into |
|
60 // <DRIVE>:\system\libs on the other platform |
|
61 // 4. Run T_IMCM02B1.exe on the other platform |
|
62 // |
|
63 // |
|
64 |
|
65 #include "emailtestutils.h" |
|
66 |
|
67 #include <miutmsg.h> |
|
68 |
|
69 #include <apfrec.h> |
|
70 #include <apgicnfl.h> |
|
71 #include <ecom/ecom.h> |
|
72 |
|
73 #include <mmsvattachmentmanager.h> |
|
74 #include <cemailaccounts.h> |
|
75 |
|
76 #include <cntdb.h> |
|
77 |
|
78 // local variables etc // |
|
79 |
|
80 _LIT(KImcm02Test, "T_IMCM02B1 - CImEmailOperation Tests"); |
|
81 RTest test(KImcm02Test); |
|
82 |
|
83 LOCAL_D CTrapCleanup* theCleanup; |
|
84 |
|
85 LOCAL_D TMsvId pop3Service; |
|
86 LOCAL_D TMsvId smtpService; |
|
87 LOCAL_D CEmailTestUtils* testUtils; |
|
88 LOCAL_D CMsvEntrySelection* messageSelection; |
|
89 LOCAL_D TInt testNo = 1; |
|
90 LOCAL_D TBool testFailed=EFalse; |
|
91 |
|
92 #define KComponent _L("IMCM") |
|
93 #define KTestMessageDir _L("") |
|
94 #define KOkFileNameEntryStructure _L("T_IMCM02B1_Entry_Structure.txt") |
|
95 |
|
96 LOCAL_D TBool StartTimeSet=EFalse; |
|
97 LOCAL_D TTime StartTime; |
|
98 LOCAL_D TInt KnownDateTimeIndex=0; |
|
99 |
|
100 LOCAL_C void SetKnownDateAndTime() |
|
101 { |
|
102 TDateTime aDateTimes[]={ |
|
103 TDateTime(2002,EJune,18,10,30,0,0), |
|
104 TDateTime(2003,EJanuary,1,21,0,0,0), |
|
105 TDateTime(2001,EDecember,18,2,15,0,0), |
|
106 TDateTime(2004,EMay,18,17,50,0,0) |
|
107 }; |
|
108 if (!StartTimeSet) |
|
109 { |
|
110 StartTime.UniversalTime(); |
|
111 StartTimeSet=ETrue; |
|
112 } |
|
113 TTime aFakeTime(aDateTimes[KnownDateTimeIndex++]); |
|
114 KnownDateTimeIndex&=3; |
|
115 User::SetHomeTime(aFakeTime); |
|
116 } |
|
117 |
|
118 LOCAL_C void RestoreDateAndTime() |
|
119 { |
|
120 if (StartTimeSet) |
|
121 { |
|
122 TTime aCurrentTime; |
|
123 aCurrentTime.UniversalTime(); |
|
124 TTimeIntervalSeconds aDuration; |
|
125 if (!aCurrentTime.SecondsFrom(StartTime,aDuration)) |
|
126 StartTime+=aDuration; |
|
127 User::SetHomeTime(StartTime); |
|
128 StartTimeSet=EFalse; |
|
129 } |
|
130 } |
|
131 |
|
132 LOCAL_C void InitL() |
|
133 { |
|
134 CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
|
135 CActiveScheduler::Install(scheduler); |
|
136 CleanupStack::PushL(scheduler); |
|
137 |
|
138 testUtils = CEmailTestUtils::NewLC(test); |
|
139 testUtils->CreateAllTestDirectories(); |
|
140 CContactDatabase* contacts(NULL); |
|
141 TRAPD(err, contacts = CContactDatabase::OpenL()); |
|
142 delete contacts; |
|
143 if (err==KErrNotFound) |
|
144 { |
|
145 testUtils->WriteComment(_L("contacts file is missing from system data")); |
|
146 testFailed=ETrue; |
|
147 return; |
|
148 } |
|
149 testUtils->FileSession().SetSessionPath(_L("C:\\")); |
|
150 testUtils->ClearEmailAccountsL(); |
|
151 testUtils->CleanMessageFolderL(); |
|
152 testUtils->GoServerSideL(); |
|
153 |
|
154 testUtils->WriteComment(_L("CImEmailOperation Tests")); |
|
155 } |
|
156 |
|
157 LOCAL_C void Closedown() |
|
158 { |
|
159 CleanupStack::PopAndDestroy(2); //testUtils, scheduler |
|
160 User::After(5000000); |
|
161 } |
|
162 |
|
163 LOCAL_C void CreateReplyL(TMsvId aMessageId, TMsvPartList aPartList, TMsvEmailTypeList aMsvEmailTypeList, TInt aTestNo) |
|
164 { |
|
165 testUtils->TestStart(aTestNo); |
|
166 CTestActive* testActive = new (ELeave) CTestActive(); |
|
167 CleanupStack::PushL(testActive); |
|
168 |
|
169 CImEmailOperation* emailOperation = CImEmailOperation::CreateReplyL(testActive->iStatus, *(testUtils->iMsvSession), aMessageId, KMsvGlobalOutBoxIndexEntryId, aPartList, aMsvEmailTypeList, KUidMsgTypeSMTP); |
|
170 CleanupStack::PushL(emailOperation); |
|
171 |
|
172 testActive->StartL(); |
|
173 CActiveScheduler::Start(); |
|
174 testUtils->TestFinish(aTestNo,testActive->iStatus.Int()); |
|
175 CleanupStack::PopAndDestroy(2); // testActive, emailOperation |
|
176 } |
|
177 |
|
178 LOCAL_C void SetAddVCardToEmailL(TBool addVCard, TMsvId serviceId) |
|
179 { |
|
180 CImSmtpSettings* smtpSettings = new (ELeave) CImSmtpSettings; |
|
181 CleanupStack::PushL(smtpSettings); |
|
182 |
|
183 CEmailAccounts* accounts = CEmailAccounts::NewLC(); |
|
184 TSmtpAccount account; |
|
185 accounts->GetSmtpAccountL(serviceId, account); |
|
186 accounts->LoadSmtpSettingsL(account,*smtpSettings); |
|
187 smtpSettings->SetAddVCardToEmail(addVCard); |
|
188 accounts->SaveSmtpSettingsL(account, *smtpSettings); |
|
189 CleanupStack::PopAndDestroy(2); // smtpSettings, msvStore/accounts |
|
190 } |
|
191 |
|
192 LOCAL_C void CreateSignatureL(TMsvId serviceId) |
|
193 { |
|
194 testUtils->iMsvEntry->SetEntryL(serviceId); |
|
195 CParaFormatLayer* paraFormatLayer=CParaFormatLayer::NewL(); |
|
196 CleanupStack::PushL(paraFormatLayer); |
|
197 |
|
198 CCharFormatLayer* charFormatLayer=CCharFormatLayer::NewL(); |
|
199 CleanupStack::PushL(charFormatLayer); |
|
200 |
|
201 CRichText* signature=CRichText::NewL(paraFormatLayer, charFormatLayer, CEditableText::EFlatStorage, 256); |
|
202 CleanupStack::PushL(signature); |
|
203 |
|
204 TBuf<100> bodyContents = _L("(Signature:) Symbian Ltd."); |
|
205 signature->InsertL(0, bodyContents); |
|
206 |
|
207 CMsvStore* msvStore = testUtils->iMsvEntry->EditStoreL(); |
|
208 CleanupStack::PushL(msvStore); |
|
209 |
|
210 msvStore->StoreBodyTextL(*signature); |
|
211 msvStore->Commit(); |
|
212 CleanupStack::PopAndDestroy(4); // msvStore, signature, charFormatLayer, paraFormatLayer |
|
213 } |
|
214 |
|
215 LOCAL_C void SetSignatureToEmailL(TBool addSignature, TMsvId serviceId) |
|
216 { |
|
217 CImSmtpSettings* smtpSettings = new (ELeave) CImSmtpSettings; |
|
218 CleanupStack::PushL(smtpSettings); |
|
219 |
|
220 CEmailAccounts* accounts = CEmailAccounts::NewLC(); |
|
221 |
|
222 TSmtpAccount account; |
|
223 accounts->GetSmtpAccountL(serviceId, account); |
|
224 accounts->LoadSmtpSettingsL(account,*smtpSettings); |
|
225 smtpSettings->SetAddSignatureToEmail(addSignature); |
|
226 accounts->SaveSmtpSettingsL(account, *smtpSettings); |
|
227 |
|
228 CleanupStack::PopAndDestroy(2); // smtpSettings, msvStore/accounts |
|
229 |
|
230 if (addSignature) |
|
231 testUtils->WriteComment(_L("\tAdd VCard")); |
|
232 } |
|
233 |
|
234 |
|
235 LOCAL_C void SetDefaultServiceL(TMsvId smtpService) |
|
236 { |
|
237 CEmailAccounts* accounts = CEmailAccounts::NewLC(); |
|
238 TSmtpAccount account; |
|
239 accounts->GetSmtpAccountL(smtpService, account); |
|
240 accounts->SetDefaultSmtpAccountL(account); |
|
241 // is default service ?? |
|
242 TSmtpAccount defaultAccount; |
|
243 accounts->DefaultSmtpAccountL(defaultAccount); |
|
244 if (account.iSmtpAccountId != defaultAccount.iSmtpAccountId) |
|
245 { |
|
246 User::Leave(KErrNotFound); |
|
247 } |
|
248 CleanupStack::PopAndDestroy(accounts); |
|
249 } |
|
250 |
|
251 |
|
252 LOCAL_C TMsvId CreateNewPlaintextMessageWithIncompleteAttachmentL() |
|
253 { |
|
254 TMsvEmailTypeList msvEmailTypeList = 0; |
|
255 TMsvPartList partList = 0; |
|
256 |
|
257 CTestActive* testActive = new (ELeave) CTestActive(); |
|
258 CleanupStack::PushL(testActive); |
|
259 partList = (KMsvMessagePartBody | KMsvMessagePartAttachments); |
|
260 CImEmailOperation* emailOperation = CImEmailOperation::CreateNewL(testActive->iStatus, *(testUtils->iMsvSession), KMsvGlobalInBoxIndexEntryId, partList, msvEmailTypeList, KUidMsgTypeSMTP); |
|
261 CleanupStack::PushL(emailOperation); |
|
262 |
|
263 testActive->StartL(); |
|
264 CActiveScheduler::Start(); |
|
265 if (testActive->iStatus.Int()) |
|
266 { |
|
267 testUtils->WriteComment(_L("CreateNewPlaintextMessageWithIncompleteAttachmentL failed")); |
|
268 testUtils->TestHarnessFailed(testActive->iStatus.Int()); |
|
269 } |
|
270 |
|
271 //check progress |
|
272 TMsvId temp; |
|
273 TPckgC<TMsvId> paramPack(temp); |
|
274 const TDesC8& progBuf1 = emailOperation->ProgressL(); |
|
275 paramPack.Set(progBuf1); |
|
276 TMsvId messageId = paramPack(); |
|
277 |
|
278 CleanupStack::PopAndDestroy(2); // testActive, emailOperation |
|
279 |
|
280 // |
|
281 // Add an attachment |
|
282 // |
|
283 testActive = new (ELeave) CTestActive(); |
|
284 CleanupStack::PushL(testActive); |
|
285 |
|
286 _LIT(KAttachment1, "C:\\mailtest\\IMCM\\rfc82201.txt"); |
|
287 _LIT(KAttachment2, "C:\\mailtest\\IMCM\\rfc82202.txt"); |
|
288 _LIT(KAttachmentFileName1, "rfc82201.txt"); |
|
289 _LIT(KAttachmentFileName2, "rfc82202.txt"); |
|
290 |
|
291 CImEmailMessage* imEmailMessage = CImEmailMessage::NewLC(*(testUtils->iMsvEntry)); |
|
292 // Make sure you are set on the Message Id |
|
293 testUtils->iMsvEntry->SetEntryL(messageId); |
|
294 CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); |
|
295 CleanupStack::PushL(attachmentInfo); |
|
296 attachmentInfo->SetAttachmentNameL(KAttachmentFileName1()); |
|
297 CleanupStack::Pop(attachmentInfo); // ownership passed to attachment manager |
|
298 imEmailMessage->AttachmentManager().AddAttachmentL(KAttachment1, attachmentInfo, testActive->iStatus); |
|
299 testActive->StartL(); |
|
300 CActiveScheduler::Start(); // wait for the asynch operation to complete |
|
301 if (testActive->iStatus.Int()) |
|
302 { |
|
303 testUtils->WriteComment(_L("CreateNewPlaintextMessageWithIncompleteAttachmentL failed")); |
|
304 testUtils->TestHarnessFailed(testActive->iStatus.Int()); |
|
305 } |
|
306 |
|
307 // Make sure you are set on the Message Id |
|
308 testUtils->iMsvEntry->SetEntryL(messageId); |
|
309 attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); |
|
310 CleanupStack::PushL(attachmentInfo); |
|
311 attachmentInfo->SetAttachmentNameL(KAttachmentFileName2()); |
|
312 CleanupStack::Pop(attachmentInfo); // ownership passed to attachment manager |
|
313 imEmailMessage->AttachmentManager().AddAttachmentL(KAttachment2, attachmentInfo, testActive->iStatus); |
|
314 testActive->StartL(); |
|
315 CActiveScheduler::Start(); // wait for the asynch operation to complete |
|
316 |
|
317 if (testActive->iStatus.Int()) |
|
318 { |
|
319 testUtils->WriteComment(_L("CreateNewPlaintextMessageWithIncompleteAttachmentL failed")); |
|
320 testUtils->TestHarnessFailed(testActive->iStatus.Int()); |
|
321 } |
|
322 const TDesC8& progBuf2 = imEmailMessage->ProgressL(); |
|
323 paramPack.Set(progBuf2); |
|
324 TMsvId attachmentId = paramPack(); |
|
325 |
|
326 CleanupStack::PopAndDestroy(2); // imEmailMessage, testActive |
|
327 |
|
328 // |
|
329 // Set the attachment to be not complete |
|
330 // |
|
331 |
|
332 testUtils->iMsvEntry->SetEntryL(attachmentId); |
|
333 TMsvEmailEntry attachmentEntry = testUtils->iMsvEntry->Entry(); |
|
334 attachmentEntry.SetComplete(EFalse); |
|
335 testUtils->iMsvEntry->ChangeL(attachmentEntry); |
|
336 |
|
337 return messageId; |
|
338 } |
|
339 |
|
340 LOCAL_C void DoPlaintextCreateReplyTestsL(TMsvId aMessageId) |
|
341 { |
|
342 TMsvPartList partList = 0; |
|
343 TMsvEmailTypeList emailTypeList = 0; |
|
344 |
|
345 // |
|
346 // Plaintext messages |
|
347 // |
|
348 testUtils->WriteComment(_L("\tPlaintext Create Reply Message Tests")); |
|
349 |
|
350 // basic new message with nothing! |
|
351 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
352 |
|
353 // only body |
|
354 partList = KMsvMessagePartBody; |
|
355 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
356 |
|
357 // only attachment |
|
358 partList = KMsvMessagePartAttachments; |
|
359 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
360 |
|
361 // only body and attachment |
|
362 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
363 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
364 |
|
365 // basic new message with subject |
|
366 partList = KMsvMessagePartDescription; |
|
367 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
368 |
|
369 // only body and subject |
|
370 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
371 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
372 |
|
373 // only attachment and subject |
|
374 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
375 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
376 |
|
377 // only body, attachment and subject |
|
378 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
379 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
380 |
|
381 // basic new message with originator |
|
382 partList = KMsvMessagePartOriginator; |
|
383 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
384 |
|
385 // only body and originator |
|
386 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
387 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
388 |
|
389 // only attachment and originator |
|
390 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
391 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
392 |
|
393 // only body, attachment and originator |
|
394 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
395 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
396 |
|
397 // basic new message with subject and originator |
|
398 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
399 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
400 |
|
401 // only body, subject and originator |
|
402 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
403 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
404 |
|
405 // only attachment, subject and originator |
|
406 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
407 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
408 |
|
409 // only body, attachment, subject and originator |
|
410 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
411 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
412 |
|
413 // basic new message with recipients |
|
414 partList = KMsvMessagePartRecipient; |
|
415 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
416 |
|
417 // only body and recipients |
|
418 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
419 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
420 |
|
421 // only attachment and recipients |
|
422 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
423 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
424 |
|
425 // only body, attachment and recipients |
|
426 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
427 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
428 |
|
429 // basic new message with subject and recipients |
|
430 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
431 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
432 |
|
433 // only body, subject and recipients |
|
434 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
435 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
436 |
|
437 // only attachment, subject and recipients |
|
438 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
439 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
440 |
|
441 // only body, attachment, subject and recipients |
|
442 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
443 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
444 |
|
445 // basic new message with originator and recipients |
|
446 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
447 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
448 |
|
449 // only body, originator and recipients |
|
450 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
451 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
452 |
|
453 // only attachment, originator and recipients |
|
454 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
455 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
456 |
|
457 // only body, attachment, originator and recipients |
|
458 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
459 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
460 |
|
461 // basic new message with subject, originator and recipients |
|
462 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
463 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
464 |
|
465 // only body, subject, originator and recipients |
|
466 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
467 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
468 |
|
469 // only attachment, subject, originator and recipients |
|
470 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
471 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
472 |
|
473 // only body, attachment, subject, originator and recipients |
|
474 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
475 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
476 |
|
477 // Create a VCard and store in the SMTP settings |
|
478 SetAddVCardToEmailL(ETrue, smtpService); |
|
479 testUtils->WriteComment(_L("\tPlaintext Create Reply Message with VCard Tests")); |
|
480 |
|
481 // basic new message with VCard |
|
482 partList = 0; |
|
483 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
484 |
|
485 // only body and VCard |
|
486 partList = KMsvMessagePartBody; |
|
487 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
488 |
|
489 // only attachment and VCard |
|
490 partList = KMsvMessagePartAttachments; |
|
491 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
492 |
|
493 // only body, attachment and VCard |
|
494 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
495 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
496 |
|
497 // basic new message with subject and VCard |
|
498 partList = KMsvMessagePartDescription; |
|
499 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
500 |
|
501 // only body, subject and VCard |
|
502 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
503 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
504 |
|
505 // only attachment, subject and VCard |
|
506 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
507 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
508 |
|
509 // only body, attachment, subject and VCard |
|
510 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
511 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
512 |
|
513 // basic new message with originator and VCard |
|
514 partList = KMsvMessagePartOriginator; |
|
515 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
516 |
|
517 // only body, originator and VCard |
|
518 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
519 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
520 |
|
521 // only attachment, originator and VCard |
|
522 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
523 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
524 |
|
525 // only body, attachment, originator and VCard |
|
526 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
527 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
528 |
|
529 // basic new message with subject, originator and VCard |
|
530 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
531 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
532 |
|
533 // only body, subject, originator and VCard |
|
534 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
535 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
536 |
|
537 // only attachment, subject, originator and VCard |
|
538 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
539 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
540 |
|
541 // only body, attachment, subject, originator and VCard |
|
542 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
543 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
544 |
|
545 // basic new message with recipients and VCard |
|
546 partList = KMsvMessagePartRecipient; |
|
547 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
548 |
|
549 // only body, recipients and VCard |
|
550 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
551 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
552 |
|
553 // only attachment, recipients and VCard |
|
554 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
555 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
556 |
|
557 // only body, attachment, recipients and VCard |
|
558 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
559 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
560 |
|
561 // basic new message with subject, recipients and VCard |
|
562 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
563 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
564 |
|
565 // only body, subject, recipients and VCard |
|
566 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
567 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
568 |
|
569 // only attachment, subject, recipients and VCard |
|
570 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
571 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
572 |
|
573 // only body, attachment, subject, recipients and VCard |
|
574 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
575 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
576 |
|
577 // basic new message with originator, recipients and VCard |
|
578 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
579 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
580 |
|
581 // only body, originator, recipients and VCard |
|
582 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
583 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
584 |
|
585 // only attachment, originator, recipients and VCard |
|
586 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
587 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
588 |
|
589 // only body, attachment, originator, recipients and VCard |
|
590 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
591 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
592 |
|
593 // basic new message with subject, originator, recipients and VCard |
|
594 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
595 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
596 |
|
597 // only body, subject, originator, recipients and VCard |
|
598 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
599 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
600 |
|
601 // only attachment, subject, originator, recipients and VCard |
|
602 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
603 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
604 |
|
605 // only body, attachment, subject, originator, recipients and VCard |
|
606 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
607 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
608 |
|
609 // Store signature in the SMTP settings |
|
610 SetAddVCardToEmailL(EFalse, smtpService); |
|
611 CreateSignatureL(smtpService); |
|
612 SetSignatureToEmailL(ETrue, smtpService); |
|
613 testUtils->WriteComment(_L("\tPlaintext Create Reply Message with signature Tests")); |
|
614 |
|
615 // basic new message with signature! |
|
616 partList = 0; |
|
617 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
618 |
|
619 // only body and signature |
|
620 partList = KMsvMessagePartBody; |
|
621 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
622 |
|
623 // only attachment and signature |
|
624 partList = KMsvMessagePartAttachments; |
|
625 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
626 |
|
627 // only body, attachment and signature |
|
628 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
629 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
630 |
|
631 // basic new message with subject and signature |
|
632 partList = KMsvMessagePartDescription; |
|
633 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
634 |
|
635 // only body, subject and signature |
|
636 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
637 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
638 |
|
639 // only attachment, subject and signature |
|
640 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
641 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
642 |
|
643 // only body, attachment, subject and signature |
|
644 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
645 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
646 |
|
647 // basic new message with originator and signature |
|
648 partList = KMsvMessagePartOriginator; |
|
649 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
650 |
|
651 // only body, originator and signature |
|
652 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
653 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
654 |
|
655 // only attachment, originator and signature |
|
656 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
657 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
658 |
|
659 // only body, attachment, originator and signature |
|
660 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
661 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
662 |
|
663 // basic new message with subject, originator and signature |
|
664 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
665 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
666 |
|
667 // only body, subject, originator and signature |
|
668 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
669 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
670 |
|
671 // only attachment, subject, originator and signature |
|
672 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
673 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
674 |
|
675 // only body, attachment, subject, originator and signature |
|
676 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
677 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
678 |
|
679 // basic new message with recipients and signature |
|
680 partList = KMsvMessagePartRecipient; |
|
681 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
682 |
|
683 // only body, recipients and signature |
|
684 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
685 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
686 |
|
687 // only attachment, recipients and signature |
|
688 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
689 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
690 |
|
691 // only body, attachment, recipients and signature |
|
692 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
693 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
694 |
|
695 // basic new message with subject, recipients and signature |
|
696 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
697 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
698 |
|
699 // only body, subject, recipients and signature |
|
700 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
701 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
702 |
|
703 // only attachment, subject, recipients and signature |
|
704 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
705 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
706 |
|
707 // only body, attachment, subject, recipients and signature |
|
708 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
709 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
710 |
|
711 // basic new message with originator, recipients and signature |
|
712 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
713 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
714 |
|
715 // only body, originator, recipients and signature |
|
716 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
717 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
718 |
|
719 // only attachment, originator, recipients and signature |
|
720 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
721 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
722 |
|
723 // only body, attachment, originator, recipients and signature |
|
724 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
725 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
726 |
|
727 // basic new message with subject, originator, recipients and signature |
|
728 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
729 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
730 |
|
731 // only body, subject, originator, recipients and signature |
|
732 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
733 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
734 |
|
735 // only attachment, subject, originator, recipients and signature |
|
736 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
737 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
738 |
|
739 // only body, attachment, subject, originator, recipients and signature |
|
740 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
741 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
742 |
|
743 // Create a VCard and store in the SMTP settings |
|
744 SetAddVCardToEmailL(ETrue, smtpService); |
|
745 testUtils->WriteComment(_L("\tPlaintext Create Reply Message with VCard and signature Tests")); |
|
746 |
|
747 // basic new message with VCard and Signature! |
|
748 partList = 0; |
|
749 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
750 |
|
751 // only body, VCard and Signature |
|
752 partList = KMsvMessagePartBody; |
|
753 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
754 |
|
755 // only attachment, VCard and Signature |
|
756 partList = KMsvMessagePartAttachments; |
|
757 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
758 |
|
759 // only body, attachment, VCard and Signature |
|
760 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
761 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
762 |
|
763 // basic new message with subject, VCard and Signature |
|
764 partList = KMsvMessagePartDescription; |
|
765 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
766 |
|
767 // only body, subject, VCard and Signature |
|
768 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
769 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
770 |
|
771 // only attachment, subject, VCard and Signature |
|
772 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
773 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
774 |
|
775 // only body, attachment, subject, VCard and Signature |
|
776 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
777 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
778 |
|
779 // basic new message with originator, VCard and Signature |
|
780 partList = KMsvMessagePartOriginator; |
|
781 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
782 |
|
783 // only body, originator, VCard and Signature |
|
784 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
785 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
786 |
|
787 // only attachment, originator, VCard and Signature |
|
788 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
789 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
790 |
|
791 // only body, attachment, originator, VCard and Signature |
|
792 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
793 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
794 |
|
795 // basic new message with subject, originator, VCard and Signature |
|
796 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
797 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
798 |
|
799 // only body, subject, originator, VCard and Signature |
|
800 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
801 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
802 |
|
803 // only attachment, subject, originator, VCard and Signature |
|
804 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
805 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
806 |
|
807 // only body, attachment, subject, originator, VCard and Signature |
|
808 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
809 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
810 |
|
811 // basic new message with recipients, VCard and Signature |
|
812 partList = KMsvMessagePartRecipient; |
|
813 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
814 |
|
815 // only body, recipients, VCard and Signature |
|
816 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
817 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
818 |
|
819 // only attachment, recipients, VCard and Signature |
|
820 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
821 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
822 |
|
823 // only body, attachment, recipients, VCard and Signature |
|
824 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
825 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
826 |
|
827 // basic new message with subject, recipients, VCard and Signature |
|
828 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
829 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
830 |
|
831 // only body, subject, recipients, VCard and Signature |
|
832 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
833 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
834 |
|
835 // only attachment, subject, recipients, VCard and Signature |
|
836 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
837 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
838 |
|
839 // only body, attachment, subject, recipients, VCard and Signature |
|
840 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
841 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
842 |
|
843 // basic new message with originator, recipients, VCard and Signature |
|
844 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
845 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
846 |
|
847 // only body, originator, recipients, VCard and Signature |
|
848 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
849 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
850 |
|
851 // only attachment, originator, recipients, VCard and Signature |
|
852 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
853 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
854 |
|
855 // only body, attachment, originator, recipients, VCard and Signature |
|
856 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
857 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
858 |
|
859 // basic new message with subject, originator, recipients, VCard and Signature |
|
860 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
861 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
862 |
|
863 // only body, subject, originator, recipients, VCard and Signature |
|
864 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
865 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
866 |
|
867 // only attachment, subject, originator, recipients, VCard and Signature |
|
868 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
869 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
870 |
|
871 // only body, attachment, subject, originator, recipients, VCard and Signature |
|
872 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
873 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
874 } |
|
875 |
|
876 LOCAL_C void DoHtmlCreateReplyTestsL(TMsvId aMessageId) |
|
877 { |
|
878 TMsvPartList partList = 0; |
|
879 TMsvEmailTypeList emailTypeList = KMsvEmailTypeListMHTMLMessage; |
|
880 |
|
881 // |
|
882 // HTML Messages |
|
883 // |
|
884 testUtils->WriteComment(_L("\tHTML Create Reply Message Tests")); |
|
885 |
|
886 // basic new message with nothing! |
|
887 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
888 |
|
889 // only body |
|
890 partList = KMsvMessagePartBody; |
|
891 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
892 |
|
893 // only attachment |
|
894 partList = KMsvMessagePartAttachments; |
|
895 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
896 |
|
897 // only body and attachment |
|
898 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
899 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
900 |
|
901 // basic new message with subject |
|
902 partList = KMsvMessagePartDescription; |
|
903 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
904 |
|
905 // only body and subject |
|
906 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
907 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
908 |
|
909 // only attachment and subject |
|
910 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
911 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
912 |
|
913 // only body, attachment and subject |
|
914 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
915 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
916 |
|
917 // basic new message with originator |
|
918 partList = KMsvMessagePartOriginator; |
|
919 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
920 |
|
921 // only body and originator |
|
922 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
923 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
924 |
|
925 // only attachment and originator |
|
926 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
927 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
928 |
|
929 // only body, attachment and originator |
|
930 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
931 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
932 |
|
933 // basic new message with subject and originator |
|
934 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
935 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
936 |
|
937 // only body, subject and originator |
|
938 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
939 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
940 |
|
941 // only attachment, subject and originator |
|
942 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
943 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
944 |
|
945 // only body, attachment, subject and originator |
|
946 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
947 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
948 |
|
949 // basic new message with recipients |
|
950 partList = KMsvMessagePartRecipient; |
|
951 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
952 |
|
953 // only body and recipients |
|
954 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
955 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
956 |
|
957 // only attachment and recipients |
|
958 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
959 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
960 |
|
961 // only body, attachment and recipients |
|
962 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
963 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
964 |
|
965 // basic new message with subject and recipients |
|
966 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
967 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
968 |
|
969 // only body, subject and recipients |
|
970 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
971 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
972 |
|
973 // only attachment, subject and recipients |
|
974 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
975 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
976 |
|
977 // only body, attachment, subject and recipients |
|
978 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
979 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
980 |
|
981 // basic new message with originator and recipients |
|
982 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
983 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
984 |
|
985 // only body, originator and recipients |
|
986 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
987 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
988 |
|
989 // only attachment, originator and recipients |
|
990 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
991 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
992 |
|
993 // only body, attachment, originator and recipients |
|
994 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
995 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
996 |
|
997 // basic new message with subject, originator and recipients |
|
998 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
999 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1000 |
|
1001 // only body, subject, originator and recipients |
|
1002 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1003 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1004 |
|
1005 // only attachment, subject, originator and recipients |
|
1006 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1007 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1008 |
|
1009 // only body, attachment, subject, originator and recipients |
|
1010 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1011 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1012 |
|
1013 // Create a VCard and store in the SMTP settings |
|
1014 SetAddVCardToEmailL(ETrue, smtpService); |
|
1015 testUtils->WriteComment(_L("\tHTML Create Reply Message with VCard Tests")); |
|
1016 |
|
1017 // basic new message with VCard |
|
1018 partList = 0; |
|
1019 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1020 |
|
1021 // only body and VCard |
|
1022 partList = KMsvMessagePartBody; |
|
1023 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1024 |
|
1025 // only attachment and VCard |
|
1026 partList = KMsvMessagePartAttachments; |
|
1027 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1028 |
|
1029 // only body, attachment and VCard |
|
1030 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
1031 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1032 |
|
1033 // basic new message with subject and VCard |
|
1034 partList = KMsvMessagePartDescription; |
|
1035 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1036 |
|
1037 // only body, subject and VCard |
|
1038 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
1039 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1040 |
|
1041 // only attachment, subject and VCard |
|
1042 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
1043 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1044 |
|
1045 // only body, attachment, subject and VCard |
|
1046 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
1047 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1048 |
|
1049 // basic new message with originator and VCard |
|
1050 partList = KMsvMessagePartOriginator; |
|
1051 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1052 |
|
1053 // only body, originator and VCard |
|
1054 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
1055 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1056 |
|
1057 // only attachment, originator and VCard |
|
1058 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
1059 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1060 |
|
1061 // only body, attachment, originator and VCard |
|
1062 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
1063 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1064 |
|
1065 // basic new message with subject, originator and VCard |
|
1066 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1067 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1068 |
|
1069 // only body, subject, originator and VCard |
|
1070 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1071 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1072 |
|
1073 // only attachment, subject, originator and VCard |
|
1074 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1075 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1076 |
|
1077 // only body, attachment, subject, originator and VCard |
|
1078 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1079 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1080 |
|
1081 // basic new message with recipients and VCard |
|
1082 partList = KMsvMessagePartRecipient; |
|
1083 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1084 |
|
1085 // only body, recipients and VCard |
|
1086 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
1087 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1088 |
|
1089 // only attachment, recipients and VCard |
|
1090 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
1091 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1092 |
|
1093 // only body, attachment, recipients and VCard |
|
1094 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
1095 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1096 |
|
1097 // basic new message with subject, recipients and VCard |
|
1098 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1099 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1100 |
|
1101 // only body, subject, recipients and VCard |
|
1102 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1103 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1104 |
|
1105 // only attachment, subject, recipients and VCard |
|
1106 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1107 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1108 |
|
1109 // only body, attachment, subject, recipients and VCard |
|
1110 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1111 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1112 |
|
1113 // basic new message with originator, recipients and VCard |
|
1114 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1115 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1116 |
|
1117 // only body, originator, recipients and VCard |
|
1118 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1119 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1120 |
|
1121 // only attachment, originator, recipients and VCard |
|
1122 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1123 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1124 |
|
1125 // only body, attachment, originator, recipients and VCard |
|
1126 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1127 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1128 |
|
1129 // basic new message with subject, originator, recipients and VCard |
|
1130 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1131 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1132 |
|
1133 // only body, subject, originator, recipients and VCard |
|
1134 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1135 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1136 |
|
1137 // only attachment, subject, originator, recipients and VCard |
|
1138 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1139 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1140 |
|
1141 // only body, attachment, subject, originator, recipients and VCard |
|
1142 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1143 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1144 |
|
1145 // Store signature in the SMTP settings |
|
1146 SetAddVCardToEmailL(EFalse, smtpService); |
|
1147 CreateSignatureL(smtpService); |
|
1148 SetSignatureToEmailL(ETrue, smtpService); |
|
1149 testUtils->WriteComment(_L("\tHTML Create Reply Message with Signature Tests")); |
|
1150 |
|
1151 // basic new message with signature! |
|
1152 partList = 0; |
|
1153 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1154 |
|
1155 // only body and signature |
|
1156 partList = KMsvMessagePartBody; |
|
1157 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1158 |
|
1159 // only attachment and signature |
|
1160 partList = KMsvMessagePartAttachments; |
|
1161 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1162 |
|
1163 // only body, attachment and signature |
|
1164 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
1165 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1166 |
|
1167 // basic new message with subject and signature |
|
1168 partList = KMsvMessagePartDescription; |
|
1169 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1170 |
|
1171 // only body, subject and signature |
|
1172 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
1173 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1174 |
|
1175 // only attachment, subject and signature |
|
1176 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
1177 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1178 |
|
1179 // only body, attachment, subject and signature |
|
1180 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
1181 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1182 |
|
1183 // basic new message with originator and signature |
|
1184 partList = KMsvMessagePartOriginator; |
|
1185 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1186 |
|
1187 // only body, originator and signature |
|
1188 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
1189 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1190 |
|
1191 // only attachment, originator and signature |
|
1192 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
1193 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1194 |
|
1195 // only body, attachment, originator and signature |
|
1196 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
1197 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1198 |
|
1199 // basic new message with subject, originator and signature |
|
1200 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1201 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1202 |
|
1203 // only body, subject, originator and signature |
|
1204 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1205 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1206 |
|
1207 // only attachment, subject, originator and signature |
|
1208 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1209 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1210 |
|
1211 // only body, attachment, subject, originator and signature |
|
1212 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1213 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1214 |
|
1215 // basic new message with recipients and signature |
|
1216 partList = KMsvMessagePartRecipient; |
|
1217 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1218 |
|
1219 // only body, recipients and signature |
|
1220 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
1221 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1222 |
|
1223 // only attachment, recipients and signature |
|
1224 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
1225 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1226 |
|
1227 // only body, attachment, recipients and signature |
|
1228 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
1229 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1230 |
|
1231 // basic new message with subject, recipients and signature |
|
1232 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1233 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1234 |
|
1235 // only body, subject, recipients and signature |
|
1236 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1237 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1238 |
|
1239 // only attachment, subject, recipients and signature |
|
1240 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1241 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1242 |
|
1243 // only body, attachment, subject, recipients and signature |
|
1244 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1245 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1246 |
|
1247 // basic new message with originator, recipients and signature |
|
1248 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1249 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1250 |
|
1251 // only body, originator, recipients and signature |
|
1252 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1253 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1254 |
|
1255 // only attachment, originator, recipients and signature |
|
1256 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1257 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1258 |
|
1259 // only body, attachment, originator, recipients and signature |
|
1260 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1261 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1262 |
|
1263 // basic new message with subject, originator, recipients and signature |
|
1264 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1265 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1266 |
|
1267 // only body, subject, originator, recipients and signature |
|
1268 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1269 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1270 |
|
1271 // only attachment, subject, originator, recipients and signature |
|
1272 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1273 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1274 |
|
1275 // only body, attachment, subject, originator, recipients and signature |
|
1276 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1277 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1278 |
|
1279 // Create a VCard and store in the SMTP settings |
|
1280 SetAddVCardToEmailL(ETrue, smtpService); |
|
1281 testUtils->WriteComment(_L("\tHTML Create Reply Message with VCard and signature Tests")); |
|
1282 |
|
1283 // basic new message with VCard and Signature! |
|
1284 partList = 0; |
|
1285 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1286 |
|
1287 // only body, VCard and Signature |
|
1288 partList = KMsvMessagePartBody; |
|
1289 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1290 |
|
1291 // only attachment, VCard and Signature |
|
1292 partList = KMsvMessagePartAttachments; |
|
1293 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1294 |
|
1295 // only body, attachment, VCard and Signature |
|
1296 partList = KMsvMessagePartBody | KMsvMessagePartAttachments; |
|
1297 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1298 |
|
1299 // basic new message with subject, VCard and Signature |
|
1300 partList = KMsvMessagePartDescription; |
|
1301 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1302 |
|
1303 // only body, subject, VCard and Signature |
|
1304 partList = KMsvMessagePartBody | KMsvMessagePartDescription; |
|
1305 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1306 |
|
1307 // only attachment, subject, VCard and Signature |
|
1308 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
1309 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1310 |
|
1311 // only body, attachment, subject, VCard and Signature |
|
1312 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription; |
|
1313 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1314 |
|
1315 // basic new message with originator, VCard and Signature |
|
1316 partList = KMsvMessagePartOriginator; |
|
1317 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1318 |
|
1319 // only body, originator, VCard and Signature |
|
1320 partList = KMsvMessagePartBody | KMsvMessagePartOriginator; |
|
1321 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1322 |
|
1323 // only attachment, originator, VCard and Signature |
|
1324 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
1325 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1326 |
|
1327 // only body, attachment, originator, VCard and Signature |
|
1328 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator; |
|
1329 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1330 |
|
1331 // basic new message with subject, originator, VCard and Signature |
|
1332 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1333 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1334 |
|
1335 // only body, subject, originator, VCard and Signature |
|
1336 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1337 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1338 |
|
1339 // only attachment, subject, originator, VCard and Signature |
|
1340 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1341 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1342 |
|
1343 // only body, attachment, subject, originator, VCard and Signature |
|
1344 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator; |
|
1345 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1346 |
|
1347 // basic new message with recipients, VCard and Signature |
|
1348 partList = KMsvMessagePartRecipient; |
|
1349 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1350 |
|
1351 // only body, recipients, VCard and Signature |
|
1352 partList = KMsvMessagePartBody | KMsvMessagePartRecipient; |
|
1353 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1354 |
|
1355 // only attachment, recipients, VCard and Signature |
|
1356 partList = KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
1357 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1358 |
|
1359 // only body, attachment, recipients, VCard and Signature |
|
1360 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartRecipient; |
|
1361 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1362 |
|
1363 // basic new message with subject, recipients, VCard and Signature |
|
1364 partList = KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1365 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1366 |
|
1367 // only body, subject, recipients, VCard and Signature |
|
1368 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1369 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1370 |
|
1371 // only attachment, subject, recipients, VCard and Signature |
|
1372 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1373 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1374 |
|
1375 // only body, attachment, subject, recipients, VCard and Signature |
|
1376 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartRecipient; |
|
1377 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1378 |
|
1379 // basic new message with originator, recipients, VCard and Signature |
|
1380 partList = KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1381 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1382 |
|
1383 // only body, originator, recipients, VCard and Signature |
|
1384 partList = KMsvMessagePartBody | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1385 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1386 |
|
1387 // only attachment, originator, recipients, VCard and Signature |
|
1388 partList = KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1389 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1390 |
|
1391 // only body, attachment, originator, recipients, VCard and Signature |
|
1392 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1393 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1394 |
|
1395 // basic new message with subject, originator, recipients, VCard and Signature |
|
1396 partList = KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1397 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1398 |
|
1399 // only body, subject, originator, recipients, VCard and Signature |
|
1400 partList = KMsvMessagePartBody | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1401 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1402 |
|
1403 // only attachment, subject, originator, recipients, VCard and Signature |
|
1404 partList = KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1405 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1406 |
|
1407 // only body, attachment, subject, originator, recipients, VCard and Signature |
|
1408 partList = KMsvMessagePartBody | KMsvMessagePartAttachments | KMsvMessagePartDescription | KMsvMessagePartOriginator | KMsvMessagePartRecipient; |
|
1409 CreateReplyL(aMessageId, partList, emailTypeList, testNo++); |
|
1410 } |
|
1411 |
|
1412 LOCAL_C TBool CompareLogsL() |
|
1413 { |
|
1414 TBool errorOccured = EFalse; |
|
1415 |
|
1416 CDesCArray* correctFile = new (ELeave) CDesCArrayFlat(1); |
|
1417 CPtrCArray* resultFile = new (ELeave) CPtrCArray(1); |
|
1418 |
|
1419 TParse parsedFileName; |
|
1420 TParse parsedResultFileName; |
|
1421 TFileName name; |
|
1422 name.Append(KOkFileNameEntryStructure); |
|
1423 User::LeaveIfError(testUtils->ResolveFile(KComponent, name, parsedFileName)); |
|
1424 correctFile->AppendL(parsedFileName.FullName()); |
|
1425 name.Zero(); |
|
1426 name.Copy(KFileNameEntryStructure); |
|
1427 User::LeaveIfError(testUtils->ResolveLogFile(name, parsedResultFileName)); |
|
1428 resultFile->AppendL(parsedResultFileName.FullName()); |
|
1429 |
|
1430 RFileReadStream file1; |
|
1431 RFileReadStream file2; |
|
1432 HBufC8* line1Buffer = HBufC8::NewLC(1024); |
|
1433 TPtr8 line1 = line1Buffer->Des(); |
|
1434 TBuf8<1> aChar1; |
|
1435 |
|
1436 HBufC8* line2Buffer = HBufC8::NewLC(1024); |
|
1437 TPtr8 line2 = line2Buffer->Des(); |
|
1438 TBuf8<1> aChar2; |
|
1439 |
|
1440 for(TInt i=0; i<correctFile->MdcaCount(); i++) |
|
1441 { |
|
1442 TFileName file1Name = correctFile->MdcaPoint(i); |
|
1443 TFileName file2Name = resultFile->MdcaPoint(i); |
|
1444 |
|
1445 TInt error1=KErrNone; |
|
1446 TInt error2=KErrNone; |
|
1447 |
|
1448 test.Printf(_L("\n%s"), file2Name.PtrZ()); |
|
1449 |
|
1450 error1=file1.Open(testUtils->FileSession(), file1Name, EFileShareAny); |
|
1451 if(error1!=KErrNone) |
|
1452 { |
|
1453 errorOccured = ETrue; |
|
1454 } |
|
1455 else |
|
1456 { |
|
1457 error2=file2.Open(testUtils->FileSession(), file2Name, EFileShareAny); |
|
1458 if(error2!=KErrNone) |
|
1459 { |
|
1460 errorOccured = ETrue; |
|
1461 } |
|
1462 } |
|
1463 |
|
1464 if((error1==KErrNone)&&(error2==KErrNone)) |
|
1465 { |
|
1466 // read the file into the conversion object |
|
1467 TBool finished = EFalse; |
|
1468 |
|
1469 do { |
|
1470 line1.FillZ(); |
|
1471 line1.SetLength(0); |
|
1472 // compile the lines one char at a time |
|
1473 do { |
|
1474 TRAPD( error, file1.ReadL(aChar1, 1) ); |
|
1475 if (error!=KErrEof) |
|
1476 line1.Append(aChar1); |
|
1477 else |
|
1478 { |
|
1479 finished = ETrue; |
|
1480 break; |
|
1481 } |
|
1482 // stop at the end of line or no more data |
|
1483 } |
|
1484 while((aChar1[0]!=0x0A)&&(line1.Length()<1024)); |
|
1485 |
|
1486 line2.FillZ(); |
|
1487 line2.SetLength(0); |
|
1488 do { |
|
1489 TRAPD( error, file2.ReadL(aChar2, 1) ); |
|
1490 if (error!=KErrEof) |
|
1491 line2.Append(aChar2); |
|
1492 else |
|
1493 { |
|
1494 finished = ETrue; |
|
1495 break; |
|
1496 } |
|
1497 // stop at the end of line or no more data |
|
1498 } |
|
1499 while((aChar2[0]!=0x0A)&&(line2.Length()<1024)); |
|
1500 |
|
1501 // get rid of white space |
|
1502 line1.TrimRight(); |
|
1503 line2.TrimRight(); |
|
1504 |
|
1505 if(line1.Compare(line2) != 0) |
|
1506 { |
|
1507 // error so no point in continuing to compare!! |
|
1508 errorOccured = ETrue; |
|
1509 file1.Close(); |
|
1510 file2.Close(); |
|
1511 delete correctFile; |
|
1512 delete resultFile; |
|
1513 CleanupStack::PopAndDestroy(2); //line 1 , line 2 |
|
1514 return ETrue; |
|
1515 } |
|
1516 } |
|
1517 while(!finished); |
|
1518 } |
|
1519 |
|
1520 file1.Close(); |
|
1521 file2.Close(); |
|
1522 } |
|
1523 |
|
1524 delete correctFile; |
|
1525 delete resultFile; |
|
1526 CleanupStack::PopAndDestroy(2); //line 1 , line 2 |
|
1527 |
|
1528 return errorOccured; |
|
1529 } |
|
1530 |
|
1531 LOCAL_C void doMainL() |
|
1532 { |
|
1533 InitL(); |
|
1534 if (testFailed) |
|
1535 { |
|
1536 Closedown(); |
|
1537 return; |
|
1538 } |
|
1539 testUtils->GoClientSideL(); |
|
1540 smtpService = testUtils->CreateSmtpServiceL(); |
|
1541 pop3Service = testUtils->CreatePopServiceL(); |
|
1542 testUtils->GoServerSideL(); |
|
1543 |
|
1544 testUtils->CreateMessageFilesL(pop3Service, KMsvGlobalInBoxIndexEntryId, _L("c:\\mailtest\\IMCM\\")); |
|
1545 |
|
1546 test.Console()->SetPos(0, 6); |
|
1547 test.Printf(_L("Performing Tests:\n")); |
|
1548 |
|
1549 testUtils->GoClientSideL(); |
|
1550 |
|
1551 SetDefaultServiceL(smtpService); |
|
1552 |
|
1553 // get a list of all email messages in the Inbox |
|
1554 testUtils->iMsvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId); |
|
1555 delete messageSelection; |
|
1556 messageSelection = testUtils->iMsvEntry->ChildrenWithTypeL(KUidMsvMessageEntry); |
|
1557 |
|
1558 TParse parsedFileName; |
|
1559 TFileName name(KTestMessageDir); |
|
1560 testUtils->ResolveLogFile(name, parsedFileName); |
|
1561 |
|
1562 SetKnownDateAndTime(); |
|
1563 |
|
1564 test.Console()->SetPos(3, 8); |
|
1565 test.Printf(_L("Create Reply Tests 1: ")); |
|
1566 //Create reply to message with attachment which is not complete |
|
1567 testUtils->WriteComment(_L("Test 1 - Create Reply to Plaintext message with incomplete attachment Tests")); |
|
1568 TMsvId messageWithIncompleteAttachment = CreateNewPlaintextMessageWithIncompleteAttachmentL(); |
|
1569 TRAPD(ret,DoPlaintextCreateReplyTestsL(messageWithIncompleteAttachment)); |
|
1570 if (ret) |
|
1571 { |
|
1572 testUtils->TestHarnessFailed(ret); |
|
1573 delete messageSelection; |
|
1574 Closedown(); |
|
1575 return; |
|
1576 } |
|
1577 |
|
1578 // |
|
1579 // Create HTML Reply tests |
|
1580 // |
|
1581 |
|
1582 SetKnownDateAndTime(); |
|
1583 |
|
1584 test.Console()->SetPos(3, 9); |
|
1585 test.Printf(_L("Create Reply Tests 2: ")); |
|
1586 testUtils->WriteComment(_L("Test 2 - Create HTML Reply Tests")); |
|
1587 // reply to normal plaintext message with no attachments |
|
1588 testUtils->WriteComment(_L("reply to normal plaintext message with no attachments")); |
|
1589 TRAP(ret,DoHtmlCreateReplyTestsL(messageSelection->At(5))); |
|
1590 if (ret) |
|
1591 { |
|
1592 testUtils->TestHarnessFailed(ret); |
|
1593 delete messageSelection; |
|
1594 Closedown(); |
|
1595 return; |
|
1596 } |
|
1597 |
|
1598 SetKnownDateAndTime(); |
|
1599 |
|
1600 test.Console()->SetPos(3, 10); |
|
1601 test.Printf(_L("Create Reply Tests 3: ")); |
|
1602 //Create reply to plaintext message with attachment |
|
1603 testUtils->WriteComment(_L("Test 3 - Create Reply to Plaintext message with attachment Tests")); |
|
1604 TRAP(ret,DoHtmlCreateReplyTestsL(messageSelection->At(1))); |
|
1605 if (ret) |
|
1606 { |
|
1607 testUtils->TestHarnessFailed(ret); |
|
1608 delete messageSelection; |
|
1609 Closedown(); |
|
1610 return; |
|
1611 } |
|
1612 |
|
1613 RestoreDateAndTime(); |
|
1614 |
|
1615 testUtils->FindChildrenL(KMsvGlobalOutBoxIndexEntryId, parsedFileName.FullName(), ETrue, EFalse); // writes message info (from Outbox) into files |
|
1616 |
|
1617 testUtils->TestFinish(testNo-1); |
|
1618 testUtils->TestHarnessCompleted(); |
|
1619 |
|
1620 delete messageSelection; |
|
1621 Closedown(); |
|
1622 |
|
1623 // shouldn't have to do this, but convertor plugins aren't |
|
1624 // doing it yet so we get a false memory leak so remove this |
|
1625 // when they fix that. |
|
1626 REComSession::FinalClose(); |
|
1627 } |
|
1628 |
|
1629 GLDEF_C TInt E32Main() |
|
1630 { |
|
1631 __UHEAP_MARK; |
|
1632 test.Start(_L("T_IMCM02 Test CImEmailOperation class\n")); |
|
1633 theCleanup=CTrapCleanup::New(); |
|
1634 TRAPD(ret,doMainL()); |
|
1635 test(ret==KErrNone); |
|
1636 RestoreDateAndTime(); |
|
1637 delete theCleanup; |
|
1638 test.End(); |
|
1639 test.Close(); |
|
1640 __UHEAP_MARKEND; |
|
1641 User::Heap().Check(); |
|
1642 return(KErrNone); |
|
1643 } |