|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 #ifndef __T_PARTIALDOWNLOADSTEP_H__ |
|
17 #define __T_PARTIALDOWNLOADSTEP_H__ |
|
18 |
|
19 #include <test\testexecutestepbase.h> |
|
20 #include "emailtestutils.h" |
|
21 #include "smstestutils.h" |
|
22 #include <stdlib.h> |
|
23 #include <msvapi.h> |
|
24 #include <smuthdr.h> |
|
25 #include <iapprefs.h> |
|
26 #include "t_partialdownloadspoofserver.h" |
|
27 #include "t_partialdownloadimapclient.h" |
|
28 |
|
29 /** |
|
30 @SYMTestCaseID DEF06342 |
|
31 @SYMTestType UT |
|
32 @SYMTestPriority High |
|
33 @SYMDEF DEF06342 |
|
34 @SYMTestCaseDependencies SpoofServer.dll |
|
35 @SYMTestCaseDesc IMAP Test of partial fetching of empty messages. |
|
36 @SYMTestActions Sets partial download limits to 2 bytes. |
|
37 Downloads the first message which has no body and an attachment greater than 2 bytes. |
|
38 Downloads a second message. |
|
39 Verifies that the messages where successfully fetched. |
|
40 @SYMTestExpectedResults Both messages should be fetched.. |
|
41 */ |
|
42 |
|
43 class CPartialDownloadStep : public CTestStep , MImapTestEventHandler |
|
44 { |
|
45 public: |
|
46 CPartialDownloadStep(); |
|
47 ~CPartialDownloadStep(); |
|
48 virtual TVerdict doTestStepPreambleL(); |
|
49 virtual TVerdict doTestStepPostambleL(); |
|
50 virtual TVerdict doTestStepL(); |
|
51 private: |
|
52 void GetDetailsFromIniFileL(); |
|
53 void CreateImapAccountL(); |
|
54 virtual void TestComplete(TInt aErrorCode); |
|
55 TInt GetEntryCountL(); |
|
56 private: |
|
57 CSpoofServer* iSpoofServer; |
|
58 CPartialDownLoadImapClient* iImapClient; |
|
59 CConsoleBase* iConsole; |
|
60 CActiveScheduler* iScheduler; |
|
61 TMsvId iImapService; |
|
62 CEmailTestUtils* iTestUtils; |
|
63 CMsvSession* iSession; |
|
64 TInt iMessageEntryCount; |
|
65 TDummySessionObserver* iSessionObserver; |
|
66 TPtrC16 iScriptFile; |
|
67 TBool iFetchWholeMessage; |
|
68 }; |
|
69 |
|
70 |
|
71 _LIT(KTestPartialDownLoad,"TestPartialDownLoad"); |
|
72 |
|
73 #endif //__T_PARTIALDOWNLOADSTEP_H__ |