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